Class: Barrymore::BotCommand
- Inherits:
-
Object
- Object
- Barrymore::BotCommand
- Defined in:
- lib/barrymore.rb
Overview
It is used for storing commands. You don’t need it
Instance Attribute Summary collapse
-
#continuation ⇒ Object
Returns the value of attribute continuation.
-
#execution ⇒ Object
readonly
Returns the value of attribute execution.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ BotCommand
constructor
A new instance of BotCommand.
Constructor Details
#initialize(name, &block) ⇒ BotCommand
Returns a new instance of BotCommand.
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
#continuation ⇒ Object
Returns the value of attribute continuation.
17 18 19 |
# File 'lib/barrymore.rb', line 17 def continuation @continuation end |
#execution ⇒ Object (readonly)
Returns the value of attribute execution.
16 17 18 |
# File 'lib/barrymore.rb', line 16 def execution @execution end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/barrymore.rb', line 16 def name @name end |