Class: Collins::Profile

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/collins/profile.rb

Constant Summary

Constants included from Util::Logging

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

Methods included from Util::Logging

#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

#optionsObject

Returns the value of attribute options.



9
10
11
# File 'lib/collins/profile.rb', line 9

def options
  @options
end

Instance Method Details

#labelObject



22
23
24
# File 'lib/collins/profile.rb', line 22

def label
  @options[:label]
end

#label?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/collins/profile.rb', line 25

def label?
  not label.nil?
end

#poolObject



47
48
49
# File 'lib/collins/profile.rb', line 47

def pool
  @options[:pool]
end

#pool?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/collins/profile.rb', line 50

def pool?
  not pool.nil?
end

#prefixObject



29
30
31
# File 'lib/collins/profile.rb', line 29

def prefix
  @options[:prefix]
end

#prefix?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/collins/profile.rb', line 32

def prefix?
  not prefix.nil?
end

#primary_roleObject



40
41
42
# File 'lib/collins/profile.rb', line 40

def primary_role
  @options[:primary_role]
end

#primary_role?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/collins/profile.rb', line 43

def primary_role?
  not primary_role.nil?
end

#profileObject



15
16
17
# File 'lib/collins/profile.rb', line 15

def profile
  @options[:profile]
end

#profile?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/collins/profile.rb', line 18

def profile?
  not profile.nil?
end

#requires_pool?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/collins/profile.rb', line 64

def requires_pool?
  @options[:requires_pool]
end

#requires_primary_role?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/collins/profile.rb', line 61

def requires_primary_role?
  @options[:requires_primary_role]
end

#requires_secondary_role?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/collins/profile.rb', line 67

def requires_secondary_role?
  @options[:requires_secondary_role]
end

#secondary_roleObject



54
55
56
# File 'lib/collins/profile.rb', line 54

def secondary_role
  @options[:secondary_role]
end

#secondary_role?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/collins/profile.rb', line 57

def secondary_role?
  not secondary_role.nil?
end

#suffix_allowed?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/collins/profile.rb', line 36

def suffix_allowed?
  @options[:suffix_allowed]
end