Module: Charyf::Controller::Helpers

Included in:
Base
Defined in:
lib/charyf/engine/controller/helpers.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/charyf/engine/controller/helpers.rb', line 5

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#action_nameObject



16
17
18
# File 'lib/charyf/engine/controller/helpers.rb', line 16

def action_name
  context.routing.action
end

#controller_nameObject

End of ClassMethods



12
13
14
# File 'lib/charyf/engine/controller/helpers.rb', line 12

def controller_name
  context.routing.controller
end

#intentObject



36
37
38
# File 'lib/charyf/engine/controller/helpers.rb', line 36

def intent
  context.intent
end

#requestObject



28
29
30
# File 'lib/charyf/engine/controller/helpers.rb', line 28

def request
  context.request
end

#sessionObject



32
33
34
# File 'lib/charyf/engine/controller/helpers.rb', line 32

def session
  context.session
end

#skillObject



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

def skill
  context.routing.skill_class_name.nil? ? nil : context.routing.skill_class_name.constantize
end

#skill_nameObject



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

def skill_name
  skill.skill_name
end