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, #initialize

Methods included from Env::Validatable

#validate, #validate!

Constructor Details

This class inherits a constructor from Ellen::Adapters::Base

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



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

def run
  explain
  listen
end

#say(body, options = {}) ⇒ Object



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

def say(body, options = {})
  Ellen.logger.info(body)
end