Class: Ellen::Adapters::Shell

Inherits:
Base
  • Object
show all
Defined in:
lib/ellen/adapters/shell.rb

Constant Summary collapse

PROMPT =
"> "
SOURCE =
"shell"
USAGE =
"Type `exit` or `quit` to end the session."

Instance Attribute Summary collapse

Attributes inherited from Base

#robot

Instance Method Summary collapse

Methods inherited from Base

inherited

Methods included from Env::Validatable

#validate, #validate!

Constructor Details

#initialize(*args) ⇒ Shell

Returns a new instance of Shell.



14
15
16
17
# File 'lib/ellen/adapters/shell.rb', line 14

def initialize(*args)
  super
  remember
end

Instance Attribute Details

#stoppedObject

Returns the value of attribute stopped.



12
13
14
# File 'lib/ellen/adapters/shell.rb', line 12

def stopped
  @stopped
end

Instance Method Details

#runObject



19
20
21
22
# File 'lib/ellen/adapters/shell.rb', line 19

def run
  explain
  listen
end

#say(message) ⇒ Object



24
25
26
# File 'lib/ellen/adapters/shell.rb', line 24

def say(message)
  Ellen.logger.info(message[:body])
end