Class: Jira::Command::Log::Add
- Defined in:
- lib/jira/commands/log/add.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#ticket ⇒ Object
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket, options) ⇒ Add
constructor
A new instance of Add.
- #run ⇒ Object
Constructor Details
#initialize(ticket, options) ⇒ Add
Returns a new instance of Add.
18 19 20 21 |
# File 'lib/jira/commands/log/add.rb', line 18 def initialize(ticket, ) self.ticket = ticket self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
16 17 18 |
# File 'lib/jira/commands/log/add.rb', line 16 def @options end |
#ticket ⇒ Object
Returns the value of attribute ticket.
16 17 18 |
# File 'lib/jira/commands/log/add.rb', line 16 def ticket @ticket end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/jira/commands/log/add.rb', line 23 def run return if time_spent.empty? api.post "issue/#{ticket}/worklog", params: params, success: on_success, failure: on_failure end |