How to access assistants from Midman Console

How to access helpers from middleman console ? The answer for both 3.x and 4.x would be useful if it were not the same object path.

+1
middleman middleman-4
source share
1 answer

I could not find any documentation on this issue, so I decided for the following work:

Here is my assistant

 module PageHelpers def thing "THING!" end end 

Call a helper method on an instance of the class that includes it:

 $ bundle exec middleman console irb...> (class Thing; include PageHelpers; end).new.thing => "THING!" 
+2
source share

All Articles