Class: BaseObject
- Inherits:
-
Object
- Object
- BaseObject
- Defined in:
- lib/html_compilation/classes/objects/base_object.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ BaseObject
constructor
A new instance of BaseObject.
- #set_value(variable, content) ⇒ Object
Constructor Details
#initialize ⇒ BaseObject
Returns a new instance of BaseObject.
2 3 4 |
# File 'lib/html_compilation/classes/objects/base_object.rb', line 2 def initialize @values = [] end |
Instance Method Details
#set_value(variable, content) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/html_compilation/classes/objects/base_object.rb', line 6 def set_value(variable, content) self.send("#{variable}=", content) unless @values.include?(variable) @values.push(variable) end end |