Class: Oat::Props
- Inherits:
-
BasicObject
- Defined in:
- lib/oat/props.rb
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Props
Returns a new instance of Props.
4
5
6
|
# File 'lib/oat/props.rb', line 4
def initialize
@attributes = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, value) ⇒ Object
12
13
14
|
# File 'lib/oat/props.rb', line 12
def method_missing(name, value)
@attributes[name] = value
end
|
Instance Method Details
#_from(data) ⇒ Object
8
9
10
|
# File 'lib/oat/props.rb', line 8
def _from(data)
@attributes = data.to_hash
end
|
#to_hash ⇒ Object
16
17
18
|
# File 'lib/oat/props.rb', line 16
def to_hash
@attributes
end
|