Class: Dennis::RecordType::ContentAttribute
- Inherits:
-
Object
- Object
- Dennis::RecordType::ContentAttribute
- Defined in:
- lib/dennis/record_type.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ ContentAttribute
constructor
A new instance of ContentAttribute.
- #label ⇒ Object
- #name ⇒ Object
- #options ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(hash) ⇒ ContentAttribute
Returns a new instance of ContentAttribute.
46 47 48 |
# File 'lib/dennis/record_type.rb', line 46 def initialize(hash) @hash = hash end |
Instance Method Details
#label ⇒ Object
54 55 56 |
# File 'lib/dennis/record_type.rb', line 54 def label @hash['label'] end |
#name ⇒ Object
50 51 52 |
# File 'lib/dennis/record_type.rb', line 50 def name @hash['name'] end |
#options ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/dennis/record_type.rb', line 62 def return [] if @hash['options'].nil? @hash['options'].map do |hash| ContentAttributeOption.new(hash) end end |
#type ⇒ Object
58 59 60 |
# File 'lib/dennis/record_type.rb', line 58 def type @hash['type'] end |