Module: Buster::CommandHandler

Defined in:
lib/buster/command_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#reply_actionObject

Returns the value of attribute reply_action.



3
4
5
# File 'lib/buster/command_handler.rb', line 3

def reply_action
  @reply_action
end

Instance Method Details

#reply(message_name, props = {}) ⇒ Object



5
6
7
8
9
# File 'lib/buster/command_handler.rb', line 5

def reply(message_name, props = {})
  raise 'No reply_action available' unless self.reply_action

  reply_action.call(message_name, props)
end