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
- #action_name ⇒ Object
-
#controller_name ⇒ Object
End of ClassMethods.
- #intent ⇒ Object
- #request ⇒ Object
- #session ⇒ Object
- #skill ⇒ Object
- #skill_name ⇒ Object
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_name ⇒ Object
16 17 18 |
# File 'lib/charyf/engine/controller/helpers.rb', line 16 def action_name context.routing.action end |
#controller_name ⇒ Object
End of ClassMethods
12 13 14 |
# File 'lib/charyf/engine/controller/helpers.rb', line 12 def controller_name context.routing.controller end |
#intent ⇒ Object
36 37 38 |
# File 'lib/charyf/engine/controller/helpers.rb', line 36 def intent context.intent end |
#request ⇒ Object
28 29 30 |
# File 'lib/charyf/engine/controller/helpers.rb', line 28 def request context.request end |
#session ⇒ Object
32 33 34 |
# File 'lib/charyf/engine/controller/helpers.rb', line 32 def session context.session end |
#skill ⇒ Object
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_name ⇒ Object
20 21 22 |
# File 'lib/charyf/engine/controller/helpers.rb', line 20 def skill_name skill.skill_name end |