Class: Frizz::Middleman::ViewHelpers::EnvironmentDecorator
- Inherits:
-
Object
- Object
- Frizz::Middleman::ViewHelpers::EnvironmentDecorator
- Defined in:
- lib/frizz/middleman/view_helpers.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ EnvironmentDecorator
constructor
A new instance of EnvironmentDecorator.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(config) ⇒ EnvironmentDecorator
Returns a new instance of EnvironmentDecorator.
11 12 13 14 |
# File 'lib/frizz/middleman/view_helpers.rb', line 11 def initialize(config) @config = config define_environment_helpers! end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
16 17 18 |
# File 'lib/frizz/middleman/view_helpers.rb', line 16 def method_missing(meth, *args, &block) config.environment.send(meth) # pass thru to environment attrs end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/frizz/middleman/view_helpers.rb', line 9 def config @config end |