Class: Aurum::Engine::SemanticActionExecutable::Attributes
- Inherits:
-
Object
- Object
- Aurum::Engine::SemanticActionExecutable::Attributes
- Defined in:
- lib/aurum/engine/parsing_facility.rb
Instance Method Summary collapse
-
#initialize ⇒ Attributes
constructor
A new instance of Attributes.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize ⇒ Attributes
Returns a new instance of Attributes.
95 96 97 |
# File 'lib/aurum/engine/parsing_facility.rb', line 95 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
99 100 101 102 103 |
# File 'lib/aurum/engine/parsing_facility.rb', line 99 def method_missing name, *args name_string = name.to_s return @attributes[name_string] unless name_string =~ /=$/ @attributes[name_string.slice(0..-2)] = args.first end |