Class: CF::Department
Instance Attribute Summary (collapse)
-
- (Object) department_name
Id of the specific Category.
-
- (Object) name
Category name.
Class Method Summary (collapse)
-
+ (Object) all
Returns all Department
Usage example.
-
+ (Object) get_lines_of_department(department_name)
Returns all lines of a specific Department.
Instance Attribute Details
- (Object) department_name
Id of the specific Category
6 7 8 |
# File 'lib/cf/department.rb', line 6 def department_name @department_name end |
- (Object) name
Category name
9 10 11 |
# File 'lib/cf/department.rb', line 9 def name @name end |
Class Method Details
+ (Object) all
Returns all Department
Usage example
categories = CF::Department.all
14 15 16 |
# File 'lib/cf/department.rb', line 14 def self.all response = get("/departments.json") end |
+ (Object) get_lines_of_department(department_name)
Returns all lines of a specific Department
19 20 21 22 |
# File 'lib/cf/department.rb', line 19 def self.get_lines_of_department(department_name) @department_name = department_name get("/departments/#{@department_name}.json") end |