Class: Shiftzilla::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/shiftzilla/team.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#componentsObject (readonly)

Returns the value of attribute components.



3
4
5
# File 'lib/shiftzilla/team.rb', line 3

def components
  @components
end

#groupObject (readonly)

Returns the value of attribute group.



3
4
5
# File 'lib/shiftzilla/team.rb', line 3

def group
  @group
end

#leadObject (readonly)

Returns the value of attribute lead.



3
4
5
# File 'lib/shiftzilla/team.rb', line 3

def lead
  @lead
end

#nameObject (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

Returns:

  • (Boolean)


13
14
15
# File 'lib/shiftzilla/team.rb', line 13

def ad_hoc?
  @ad_hoc
end