How can helpers be accessed from middleman console
? Answer for both 3.x and 4.x would be helpful if it's not the same object path.
Asked
Active
Viewed 156 times
1

rb-
- 2,315
- 29
- 41
1 Answers
3
I couldn't find any documentation on this, so settled for the following work around:
Here's my helper
module PageHelpers
def thing
"THING!"
end
end
Call the helper method on an instance of a class that includes it:
$ bundle exec middleman console
irb...> (class Thing; include PageHelpers; end).new.thing
=> "THING!"

Andy Stabler
- 1,309
- 1
- 15
- 19