Ruby on Rails Tuesday, April 27, 2010

Hi,

I want to know the use of "::" operator in rails.
Actually, I have created a module with name "Email" and written a method
def check_email(email)
end
I want to access this method. So I went to the "ruby/script console" and
done like as follows:-

"Email::check_email('test@gmail.com')"
I got an error that "undefined method `check_email' for Email:Module".
Can anyone tell me what is wrong with my code?
Also Is it the use of :: operator?


Thanks
Mike
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment