Class: Dennis::RecordType::ContentAttribute

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

Instance Method Summary collapse

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

#labelObject



54
55
56
# File 'lib/dennis/record_type.rb', line 54

def label
  @hash['label']
end

#nameObject



50
51
52
# File 'lib/dennis/record_type.rb', line 50

def name
  @hash['name']
end

#optionsObject



62
63
64
65
66
67
68
# File 'lib/dennis/record_type.rb', line 62

def options
  return [] if @hash['options'].nil?

  @hash['options'].map do |hash|
    ContentAttributeOption.new(hash)
  end
end

#typeObject



58
59
60
# File 'lib/dennis/record_type.rb', line 58

def type
  @hash['type']
end