Class: Blinkman::Adapter::Shell
- Defined in:
- lib/blinkman/adapter/shell.rb
Constant Summary collapse
- PROMPT =
'> '
Instance Attribute Summary collapse
-
#stopped ⇒ Object
readonly
Returns the value of attribute stopped.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(bot) ⇒ Shell
constructor
A new instance of Shell.
- #listen ⇒ Object
- #read ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(bot) ⇒ Shell
Returns a new instance of Shell.
10 11 12 13 |
# File 'lib/blinkman/adapter/shell.rb', line 10 def initialize(bot) @stopped = false super end |
Instance Attribute Details
#stopped ⇒ Object (readonly)
Returns the value of attribute stopped.
6 7 8 |
# File 'lib/blinkman/adapter/shell.rb', line 6 def stopped @stopped end |
Instance Method Details
#listen ⇒ Object
15 16 17 18 19 |
# File 'lib/blinkman/adapter/shell.rb', line 15 def listen while ! stopped bot.on_receive(read) end end |