Class: Slideshow::HeadersDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Slideshow::HeadersDrop
- Defined in:
- lib/slideshow/drops.rb
Instance Method Summary collapse
-
#initialize(headers) ⇒ HeadersDrop
constructor
A new instance of HeadersDrop.
- #liquid_method_missing(method) ⇒ Object
Constructor Details
#initialize(headers) ⇒ HeadersDrop
Returns a new instance of HeadersDrop.
7 8 9 |
# File 'lib/slideshow/drops.rb', line 7 def initialize( headers ) @headers = headers end |
Instance Method Details
#liquid_method_missing(method) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/slideshow/drops.rb', line 11 def liquid_method_missing( method ) ## note: was before_method before 4+ in liquid (that is, only works in liquid 4+) ## note: assume returned value is always a string or nil (if key not found) puts " call HeadersDrop#before_method >#{method}< : #{method.class}" value = @headers[ method ] value end |