Class: Shiftzilla::Team
- Inherits:
-
Object
- Object
- Shiftzilla::Team
- Defined in:
- lib/shiftzilla/team.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#lead ⇒ Object
readonly
Returns the value of attribute lead.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #ad_hoc? ⇒ Boolean
-
#initialize(tinfo, group_map, ad_hoc = false) ⇒ Team
constructor
A new instance of Team.
Constructor Details
#initialize(tinfo, group_map, ad_hoc = false) ⇒ Team
Returns a new instance of Team.
5 6 7 8 9 10 11 |
# File 'lib/shiftzilla/team.rb', line 5 def initialize(tinfo,group_map,ad_hoc=false) @name = tinfo['name'] @lead = ad_hoc ? nil : tinfo['lead'] @group = ad_hoc ? nil : group_map[tinfo['group']] @components = tinfo.has_key?('components') ? tinfo['components'] : [] @ad_hoc = ad_hoc end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components.
3 4 5 |
# File 'lib/shiftzilla/team.rb', line 3 def components @components end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
3 4 5 |
# File 'lib/shiftzilla/team.rb', line 3 def group @group end |
#lead ⇒ Object (readonly)
Returns the value of attribute lead.
3 4 5 |
# File 'lib/shiftzilla/team.rb', line 3 def lead @lead end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/shiftzilla/team.rb', line 3 def name @name end |
Instance Method Details
#ad_hoc? ⇒ Boolean
13 14 15 |
# File 'lib/shiftzilla/team.rb', line 13 def ad_hoc? @ad_hoc end |