Class: Barrymore::BotCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/barrymore.rb

Overview

It is used for storing commands. You don’t need it

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ BotCommand

Returns a new instance of BotCommand.

Raises:

  • (ArgumentError)


19
20
21
22
23
# File 'lib/barrymore.rb', line 19

def initialize(name, &block)
  raise(ArgumentError, 'no block given') unless block
  @name = name.freeze
  @execution = block
end

Instance Attribute Details

#continuationObject

Returns the value of attribute continuation.



17
18
19
# File 'lib/barrymore.rb', line 17

def continuation
  @continuation
end

#executionObject (readonly)

Returns the value of attribute execution.



16
17
18
# File 'lib/barrymore.rb', line 16

def execution
  @execution
end

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/barrymore.rb', line 16

def name
  @name
end