Class: Dennis::RecordType
- Inherits:
-
Object
- Object
- Dennis::RecordType
show all
- Defined in:
- lib/dennis/record_type.rb
Defined Under Namespace
Classes: ContentAttribute, ContentAttributeOption
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of RecordType.
18
19
20
|
# File 'lib/dennis/record_type.rb', line 18
def initialize(hash)
@hash = hash
end
|
Class Method Details
.all(client) ⇒ Object
8
9
10
11
12
13
14
|
# 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
|
Instance Method Details
#content_attributes ⇒ Object
38
39
40
41
42
|
# File 'lib/dennis/record_type.rb', line 38
def content_attributes
@hash['content_attributes'].map do |hash|
ContentAttribute.new(hash)
end
end
|
#exposed? ⇒ Boolean
34
35
36
|
# File 'lib/dennis/record_type.rb', line 34
def exposed?
@hash['exposed'] == true
end
|
#managed_only? ⇒ Boolean
30
31
32
|
# File 'lib/dennis/record_type.rb', line 30
def managed_only?
@hash['managed_only'] == true
end
|
#name ⇒ Object
22
23
24
|
# File 'lib/dennis/record_type.rb', line 22
def name
@hash['name']
end
|
#requires_priority? ⇒ Boolean
26
27
28
|
# File 'lib/dennis/record_type.rb', line 26
def requires_priority?
@hash['requires_priority'] == true
end
|