Class: Charyf::Controller::Base

Inherits:
Object
  • Object
show all
Includes:
Actions, Helpers, Renderers
Defined in:
lib/charyf/engine/controller/controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Actions

included, #logger

Methods included from Helpers

#action_name, #controller_name, included, #intent, #request, #session, #skill, #skill_name

Methods included from Renderers

#ensure_responses_for, included, #render_html_response, #render_text_response, #response_folder, #responses_for

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



21
22
23
# File 'lib/charyf/engine/controller/controller.rb', line 21

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



19
20
21
# File 'lib/charyf/engine/controller/controller.rb', line 19

def context
  @context
end

Instance Method Details

#unknownObject



25
26
27
# File 'lib/charyf/engine/controller/controller.rb', line 25

def unknown
  reply text: "I don't know what you meant by '#{request.text}'"
end