Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/text_filters.rb,
lib/liquid/extensions.rb
Instance Method Summary collapse
-
#get_binding ⇒ Object
Gets the binding object for use with ERB.
-
#method_missing(meth, *arg) ⇒ Object
Having the method_missing catchall in conjunction with get_binding allows us to use the hash as a Context for ERB.
- #to_liquid ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *arg) ⇒ Object
Having the method_missing catchall in conjunction with get_binding allows us to use the hash as a Context for ERB
124 125 126 127 128 129 130 |
# File 'lib/text_filters.rb', line 124 def method_missing(meth, *arg) if self.has_key? meth.to_s self[meth.to_s] else super end end |
Instance Method Details
#get_binding ⇒ Object
Gets the binding object for use with ERB
132 133 134 |
# File 'lib/text_filters.rb', line 132 def get_binding binding end |
#to_liquid ⇒ Object
14 15 16 |
# File 'lib/liquid/extensions.rb', line 14 def to_liquid self end |