Class: Render::Generator
- Inherits:
-
Object
- Object
- Render::Generator
- Defined in:
- lib/render/generator.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#matcher ⇒ Object
Returns the value of attribute matcher.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(properties = {}) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(properties = {}) ⇒ Generator
Returns a new instance of Generator.
7 8 9 10 11 |
# File 'lib/render/generator.rb', line 7 def initialize(properties = {}) properties.symbolize_keys! %w(type matcher algorithm).each { |attribute| self.__send__("#{attribute}=", properties[attribute.to_sym]) } raise Errors::Generator::MalformedAlgorithm.new(algorithm) if !algorithm.respond_to?(:call) end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
5 6 7 |
# File 'lib/render/generator.rb', line 5 def algorithm @algorithm end |
#matcher ⇒ Object
Returns the value of attribute matcher.
5 6 7 |
# File 'lib/render/generator.rb', line 5 def matcher @matcher end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/render/generator.rb', line 5 def type @type end |