To extend a module in Rails, you purely just call it again.
Lets say you have "module MyModule", then just write "module
MyModel"
in the file which you extend from.
If it''s an already built class and you want to override module
MyModule; class SubClass… Make sure you include the SubClass or it
won''t be overridden.
There should be decent documentation on how to do it on the gem''s
website or atleast elsewhere. Check that out.
Zach Inglis
→ Blog — http://www.zachinglis.com
→ Company — http://www.lt3media.com
→ Portfolio — http://portfolio.zachinglis.com
On May 6, 2007, at 2:14 PM, Navjeet Nsingh wrote:
>
> Hello there,
>
> I am fairly new to rails and i was trying to accomplish the following:
> There is a gem called ''scrubyt'' http://scrubyt.org/ (for
web scraping)
> and i want to use it in my rails application.
>
> I just don''t know what is the best way to use it. Should I make a
> model
> that extends from the module? Or can I somehow use the module directly
> in Rails controller.
>
> I guess my problem is that I am not too familiar with ruby modules and
> how to extend them in rails.
>
> any help will be highly appreciated!
> nsingh
>
> --
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
-~----------~----~----~----~------~----~------~--~---