Module: James
- Defined in:
- lib/james.rb,
lib/james.rb,
lib/james/dialogs.rb,
lib/james/state_api.rb,
lib/james/controller.rb,
lib/james/dialog_api.rb,
lib/james/inputs/base.rb,
lib/james/conversation.rb,
lib/james/inputs/audio.rb,
lib/james/outputs/audio.rb,
lib/james/markers/marker.rb,
lib/james/markers/memory.rb,
lib/james/inputs/terminal.rb,
lib/james/markers/current.rb,
lib/james/state_internals.rb,
lib/james/dialog_internals.rb,
lib/james/outputs/terminal.rb
Defined Under Namespace
Modules: Dialog, Inputs, Markers, Outputs Classes: Controller, Conversation, Dialogs, State
Class Method Summary collapse
-
.controller ⇒ Object
Controller instance.
- .dialog(*args, &block) ⇒ Object
-
.listen(options) ⇒ Object
Start listening.
-
.use(*dialogs) ⇒ Object
Use the given dialogs.
Class Method Details
.controller ⇒ Object
Controller instance.
46 47 48 |
# File 'lib/james.rb', line 46 def self.controller Controller.instance end |
.dialog(*args, &block) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/james/dialog_api.rb', line 29 def dialog *args, &block dialog = Class.new { include James::Dialog } dialog.class_eval &block use dialog.new(*args) dialog end |
.listen(options) ⇒ Object
Start listening.
40 41 42 |
# File 'lib/james.rb', line 40 def self.listen controller.listen end |
.use(*dialogs) ⇒ Object
Use the given dialogs.
If called twice or more, will just add more dialogs.
34 35 36 |
# File 'lib/james.rb', line 34 def self.use *dialogs dialogs.each { |dialog| controller << dialog} end |