Class: Shiftzilla::Group
- Inherits:
-
Object
- Object
- Shiftzilla::Group
- Defined in:
- lib/shiftzilla/group.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#lead ⇒ Object
readonly
Returns the value of attribute lead.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(ginfo) ⇒ Group
constructor
A new instance of Group.
- #set_components(component_list) ⇒ Object
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
#components ⇒ Object (readonly)
Returns the value of attribute components.
3 4 5 |
# File 'lib/shiftzilla/group.rb', line 3 def components @components end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/shiftzilla/group.rb', line 3 def id @id end |
#lead ⇒ Object (readonly)
Returns the value of attribute lead.
3 4 5 |
# File 'lib/shiftzilla/group.rb', line 3 def lead @lead end |
#name ⇒ Object (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 |