Class: Mugatu::Attribute
- Inherits:
-
Object
- Object
- Mugatu::Attribute
- Defined in:
- lib/mugatu/attribute.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, type, options = {}) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(key, type, options = {}) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 8 9 |
# File 'lib/mugatu/attribute.rb', line 5 def initialize(key, type, = {}) @key = key @type = type self.value = [:default_value] # nil when none is set. end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/mugatu/attribute.rb', line 3 def key @key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/mugatu/attribute.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/mugatu/attribute.rb', line 3 def value @value end |