Class: Slideshow::HeadersDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/slideshow/drops.rb

Instance Method Summary collapse

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