Class: Defaulty::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/defaulty.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



36
37
38
# File 'lib/defaulty.rb', line 36

def name
  @name
end

#summaryObject (readonly)

Returns the value of attribute summary.



36
37
38
# File 'lib/defaulty.rb', line 36

def summary
  @summary
end

#typeObject (readonly)

Returns the value of attribute type.



36
37
38
# File 'lib/defaulty.rb', line 36

def type
  @type
end