Class: Shiftzilla::Group

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ginfo) ⇒ Group

Returns a new instance of Group.



5
6
7
8
9
# File 'lib/shiftzilla/group.rb', line 5

def initialize(ginfo)
  @name        = "Group " + ginfo['id']
  @id          = ginfo['id']
  @lead        = ginfo['lead']
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



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

def components
  @components
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#leadObject (readonly)

Returns the value of attribute lead.



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

def lead
  @lead
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#set_components(component_list) ⇒ Object



11
12
13
# File 'lib/shiftzilla/group.rb', line 11

def set_components(component_list)
  @components ||= component_list
end