Class: Projects::Model::Category
- Inherits:
-
Object
- Object
- Projects::Model::Category
- Defined in:
- lib/projects/model/Category.rb
Overview
-
This class is used to make an object for Category.
Instance Method Summary collapse
-
#getId ⇒ Object
-
Get the category id.
-
-
#getName ⇒ Object
-
Get the category name.
-
-
#setId(id) ⇒ Object
-
Set the category id.
-
-
#setName(name) ⇒ Object
-
Set the category name.
-
-
#toParamMAP ⇒ Object
-
Convert the Category object into HashMap object.
-
Instance Method Details
#getId ⇒ Object
-
Get the category id.
Returns
-
Category id.
29 30 31 |
# File 'lib/projects/model/Category.rb', line 29 def getId return @id end |
#getName ⇒ Object
-
Get the category name.
Returns
-
Category name.
49 50 51 |
# File 'lib/projects/model/Category.rb', line 49 def getName return @name end |
#setId(id) ⇒ Object
-
Set the category id.
Parameters
- id
-
ID of the category.
-
19 20 21 |
# File 'lib/projects/model/Category.rb', line 19 def setId(id) @id = id end |
#setName(name) ⇒ Object
-
Set the category name.
Parameters
- name
-
Name of the category.
-
39 40 41 |
# File 'lib/projects/model/Category.rb', line 39 def setName(name) @name = name end |
#toParamMAP ⇒ Object
-
Convert the Category object into HashMap object.
Returns
-
HashMap object.
59 60 61 62 63 64 65 66 67 |
# File 'lib/projects/model/Category.rb', line 59 def toParamMAP requestBody = Hash.new if name != nil requestBody["name"] = name end return requestBody end |