Class: FuzzBert::Template::Identifier
- Inherits:
-
Object
- Object
- FuzzBert::Template::Identifier
- Defined in:
- lib/fuzzbert/template.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ Identifier
constructor
A new instance of Identifier.
- #to_data(callbacks) ⇒ Object
Constructor Details
#initialize(name) ⇒ Identifier
Returns a new instance of Identifier.
143 144 145 |
# File 'lib/fuzzbert/template.rb', line 143 def initialize(name) @name = name.to_sym end |
Instance Method Details
#to_data(callbacks) ⇒ Object
147 148 149 150 151 |
# File 'lib/fuzzbert/template.rb', line 147 def to_data(callbacks) cb = callbacks[@name] raise RuntimeError.new "No callback set for :#{@name}" unless cb cb.call end |