Class: OnlyofficeTestrailWrapper::TestrailMilestone
- Inherits:
-
Object
- Object
- OnlyofficeTestrailWrapper::TestrailMilestone
- Defined in:
- lib/onlyoffice_testrail_wrapper/testrail_milestone.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_completed ⇒ Object
Returns the value of attribute is_completed.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(name = '', description = '', is_completed = false, id = nil) ⇒ TestrailMilestone
constructor
A new instance of TestrailMilestone.
- #update(is_completed = false, name = @name, description = @description) ⇒ Object
Constructor Details
#initialize(name = '', description = '', is_completed = false, id = nil) ⇒ TestrailMilestone
Returns a new instance of TestrailMilestone.
7 8 9 10 11 12 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 7 def initialize(name = '', description = '', is_completed = false, id = nil) @id = id.to_i @name = name @description = description @is_completed = is_completed end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 5 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 5 def id @id end |
#is_completed ⇒ Object
Returns the value of attribute is_completed.
5 6 7 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 5 def is_completed @is_completed end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 5 def name @name end |
Instance Method Details
#delete ⇒ Object
19 20 21 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 19 def delete Testrail2.http_post "index.php?/api/v2/delete_milestone/#{@id}", {} end |
#update(is_completed = false, name = @name, description = @description) ⇒ Object
14 15 16 17 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_milestone.rb', line 14 def update(is_completed = false, name = @name, description = @description) HashHelper.parse_to_class_variable(Testrail2.http_post("index.php?/api/v2/update_milestone/#{@id}", name: name, description: description, is_completed: is_completed), TestrailMilestone) end |