Module: SlackTrello::Commands::StandardStuff

Included in:
CopyCards, CreateCard, Retro, Work
Defined in:
lib/slack_trello/commands/standard_stuff.rb

Instance Method Summary collapse

Instance Method Details

#help_messageObject



7
8
9
10
11
12
# File 'lib/slack_trello/commands/standard_stuff.rb', line 7

def help_message
%{:cry: Invalid format
Your message: #{text}
Example: #{example_command}
}
end

#list_not_found_messageObject



3
4
5
# File 'lib/slack_trello/commands/standard_stuff.rb', line 3

def list_not_found_message
  "A Trello list named #{trello_list_name} must be added to the '#{trello_board_name}' board for the command to function."
end

#speakerObject



14
15
16
17
18
19
20
21
# File 'lib/slack_trello/commands/standard_stuff.rb', line 14

def speaker
  args = {
    webhook_url: webhook_url,
    channel: slack_post_response.channel_name,
    username: slack_post_response.user_name
  }
  SlackTrello::SlackHelpers::Speaker.new(args)
end

#success_messageObject



23
24
25
# File 'lib/slack_trello/commands/standard_stuff.rb', line 23

def success_message
  ":mega: [#{slack_post_response.user_name}] has created a new trello card: <#{trello_card.short_url}|#{slack_post_response.text.strip}>"
end