Class: Collins::Profile
- Inherits:
-
Object
show all
- Includes:
- Util
- Defined in:
- lib/collins/profile.rb
Constant Summary
Util::Logging::DEFAULT_LOG_FORMAT
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Util
#deep_copy_hash, #get_asset_or_tag, included, #require_non_empty, #require_that, #stringify_hash, #symbolize_hash
#get_logger
Constructor Details
#initialize(options = {}) ⇒ Profile
Returns a new instance of Profile.
11
12
13
|
# File 'lib/collins/profile.rb', line 11
def initialize options = {}
@options = symbolize_hash options, :downcase => true
end
|
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
9
10
11
|
# File 'lib/collins/profile.rb', line 9
def options
@options
end
|
Instance Method Details
#label ⇒ Object
22
23
24
|
# File 'lib/collins/profile.rb', line 22
def label
@options[:label]
end
|
#label? ⇒ Boolean
25
26
27
|
# File 'lib/collins/profile.rb', line 25
def label?
not label.nil?
end
|
#pool ⇒ Object
47
48
49
|
# File 'lib/collins/profile.rb', line 47
def pool
@options[:pool]
end
|
#pool? ⇒ Boolean
50
51
52
|
# File 'lib/collins/profile.rb', line 50
def pool?
not pool.nil?
end
|
#prefix ⇒ Object
29
30
31
|
# File 'lib/collins/profile.rb', line 29
def prefix
@options[:prefix]
end
|
#prefix? ⇒ Boolean
32
33
34
|
# File 'lib/collins/profile.rb', line 32
def prefix?
not prefix.nil?
end
|
#primary_role ⇒ Object
40
41
42
|
# File 'lib/collins/profile.rb', line 40
def primary_role
@options[:primary_role]
end
|
#primary_role? ⇒ Boolean
43
44
45
|
# File 'lib/collins/profile.rb', line 43
def primary_role?
not primary_role.nil?
end
|
#profile ⇒ Object
15
16
17
|
# File 'lib/collins/profile.rb', line 15
def profile
@options[:profile]
end
|
#profile? ⇒ Boolean
18
19
20
|
# File 'lib/collins/profile.rb', line 18
def profile?
not profile.nil?
end
|
#requires_pool? ⇒ Boolean
64
65
66
|
# File 'lib/collins/profile.rb', line 64
def requires_pool?
@options[:requires_pool]
end
|
#requires_primary_role? ⇒ Boolean
61
62
63
|
# File 'lib/collins/profile.rb', line 61
def requires_primary_role?
@options[:requires_primary_role]
end
|
#requires_secondary_role? ⇒ Boolean
67
68
69
|
# File 'lib/collins/profile.rb', line 67
def requires_secondary_role?
@options[:requires_secondary_role]
end
|
#secondary_role ⇒ Object
54
55
56
|
# File 'lib/collins/profile.rb', line 54
def secondary_role
@options[:secondary_role]
end
|
#secondary_role? ⇒ Boolean
57
58
59
|
# File 'lib/collins/profile.rb', line 57
def secondary_role?
not secondary_role.nil?
end
|
#suffix_allowed? ⇒ Boolean
36
37
38
|
# File 'lib/collins/profile.rb', line 36
def suffix_allowed?
@options[:suffix_allowed]
end
|