Class: Defaulty::Property
- Inherits:
-
Object
- Object
- Defaulty::Property
- Defined in:
- lib/defaulty.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(key, data) ⇒ Property
constructor
A new instance of Property.
Constructor Details
#initialize(key, data) ⇒ Property
Returns a new instance of Property.
38 39 40 41 42 43 |
# File 'lib/defaulty.rb', line 38 def initialize(key, data) @name = key @summary = data['summary'] @type = data['type'] # TODO: add more properties end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/defaulty.rb', line 36 def name @name end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
36 37 38 |
# File 'lib/defaulty.rb', line 36 def summary @summary end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
36 37 38 |
# File 'lib/defaulty.rb', line 36 def type @type end |