Class: Beanie::WorkCentreGroup
- Defined in:
- lib/beanie/work_centre_group.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
-
.find_by_code(code) ⇒ Object
Find a work centre group by code.
Instance Method Summary collapse
-
#initialize ⇒ WorkCentreGroup
constructor
Initialize instance variables.
Methods inherited from Api
all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers
Constructor Details
#initialize ⇒ WorkCentreGroup
Initialize instance variables
36 37 38 39 40 41 |
# File 'lib/beanie/work_centre_group.rb', line 36 def initialize @id = nil @code = nil @name = nil @description = nil end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
32 33 34 |
# File 'lib/beanie/work_centre_group.rb', line 32 def code @code end |
#description ⇒ Object
Returns the value of attribute description.
32 33 34 |
# File 'lib/beanie/work_centre_group.rb', line 32 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/work_centre_group.rb', line 32 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/beanie/work_centre_group.rb', line 32 def name @name end |
Class Method Details
.find_by_code(code) ⇒ Object
Find a work centre group by code
45 46 47 48 |
# File 'lib/beanie/work_centre_group.rb', line 45 def self.find_by_code(code) data = self.get(:code => code) new.populate(data['work_centre_group']) end |