Class: Flake::Mustache

Inherits:
Object
  • Object
show all
Defined in:
lib/flake/mustache.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mustache

Returns a new instance of Mustache.



4
5
6
# File 'lib/flake/mustache.rb', line 4

def initialize( options={} )
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &blk) ⇒ Object



8
9
10
# File 'lib/flake/mustache.rb', line 8

def method_missing( method, *args, &blk )
  @options.has_key?( method ) ? @options[ method ] : template_for( method )
end