Class: Botiasloop::Commands::Label
- Defined in:
- lib/botiasloop/commands/label.rb
Overview
Label command - manages conversation labels
Instance Method Summary collapse
-
#execute(context, args = nil) ⇒ String
Execute the label command.
Methods inherited from Base
command, description, inherited
Instance Method Details
#execute(context, args = nil) ⇒ String
Execute the label command
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/botiasloop/commands/label.rb', line 15 def execute(context, args = nil) conversation = context.conversation if args.nil? || args.strip.empty? # Show current label return show_label(conversation) end # Set label label_value = args.strip set_label(conversation, label_value) end |