Module: OnlyofficeBugzillaHelper::BugData
- Included in:
- BugzillaHelper
- Defined in:
- lib/onlyoffice_bugzilla_helper/bug_data.rb
Overview
Method to work with bug data
Instance Method Summary collapse
-
#bug_data(bug_id) ⇒ JSON
Get bug data of bug.
- #bug_exists?(bug_id) ⇒ Boolean
-
#bug_status(bug_id) ⇒ String
Get status of bug.
Instance Method Details
#bug_data(bug_id) ⇒ JSON
Get bug data of bug
9 10 11 12 |
# File 'lib/onlyoffice_bugzilla_helper/bug_data.rb', line 9 def bug_data(bug_id) res = get_bug_result(bug_id) JSON.parse(res.body)['bugs'].first end |
#bug_exists?(bug_id) ⇒ Boolean
24 25 26 27 28 29 |
# File 'lib/onlyoffice_bugzilla_helper/bug_data.rb', line 24 def bug_exists?(bug_id) bug_status(bug_id) true rescue JSON::ParserError, NoMethodError false end |
#bug_status(bug_id) ⇒ String
Get status of bug
17 18 19 20 |
# File 'lib/onlyoffice_bugzilla_helper/bug_data.rb', line 17 def bug_status(bug_id) parsed_json = bug_data(bug_id) parsed_json['status'] end |