Module: Amrita2::Util::OptionSupport
- Included in:
- Core::DefaultFilter, Filters::Each, Filters::ToHash, Option
- Defined in:
- lib/amrita2/template.rb
Overview
:nodoc: all
Instance Attribute Summary collapse
-
#opt ⇒ Object
readonly
Returns the value of attribute opt.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
281 282 283 284 285 286 287 |
# File 'lib/amrita2/template.rb', line 281 def method_missing(sym, *args, &block) if @opt and @opt.has_key?(sym) @opt[sym] else super end end |
Instance Attribute Details
#opt ⇒ Object (readonly)
Returns the value of attribute opt.
262 263 264 |
# File 'lib/amrita2/template.rb', line 262 def opt @opt end |
Instance Method Details
#[](key) ⇒ Object
277 278 279 |
# File 'lib/amrita2/template.rb', line 277 def [](key) @opt[key] end |