class Dennis::RecordType
Public Class Methods
all(client)
click to toggle source
# File lib/dennis/record_type.rb, line 8 def all(client) request = client.api.create_request(:get, 'record_types') request.perform.hash['record_types'].each_with_object({}) do |rt, hash| type = new(rt) hash[type.name] = type end end
new(hash)
click to toggle source
# File lib/dennis/record_type.rb, line 18 def initialize(hash) @hash = hash end
Public Instance Methods
content_attributes()
click to toggle source
# File lib/dennis/record_type.rb, line 38 def content_attributes @hash['content_attributes'].map do |hash| ContentAttribute.new(hash) end end
exposed?()
click to toggle source
# File lib/dennis/record_type.rb, line 34 def exposed? @hash['exposed'] == true end
managed_only?()
click to toggle source
# File lib/dennis/record_type.rb, line 30 def managed_only? @hash['managed_only'] == true end
name()
click to toggle source
# File lib/dennis/record_type.rb, line 22 def name @hash['name'] end
requires_priority?()
click to toggle source
# File lib/dennis/record_type.rb, line 26 def requires_priority? @hash['requires_priority'] == true end