Class: SlackTrello::WorkCommand
- Inherits:
-
Object
- Object
- SlackTrello::WorkCommand
- Defined in:
- lib/slack_trello/work_command.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#webhook_url ⇒ Object
readonly
Returns the value of attribute webhook_url.
Instance Method Summary collapse
-
#initialize(args, webhook_url) ⇒ WorkCommand
constructor
A new instance of WorkCommand.
- #run ⇒ Object
Constructor Details
#initialize(args, webhook_url) ⇒ WorkCommand
Returns a new instance of WorkCommand.
5 6 7 8 |
# File 'lib/slack_trello/work_command.rb', line 5 def initialize(args, webhook_url) @parser = ResponseParser.new(args) @webhook_url = webhook_url end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
3 4 5 |
# File 'lib/slack_trello/work_command.rb', line 3 def parser @parser end |
#webhook_url ⇒ Object (readonly)
Returns the value of attribute webhook_url.
3 4 5 |
# File 'lib/slack_trello/work_command.rb', line 3 def webhook_url @webhook_url end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/slack_trello/work_command.rb', line 10 def run return unless trello_card_creator.trello_board return unless trello_card_creator.trello_list trello_card speaker.speak "You should see a notification with a link. If not, the card might not have been created." end |