How can I execute a method in a module from the Rails console? How can I execute a method in a module from the Rails console? ruby-on-rails ruby-on-rails

How can I execute a method in a module from the Rails console?


To run it from the rails console you just have to include it:

> include Reports::MyMod> mymethod


class A  include Reports::MyModendA.new.mymethod