Class: Charyf::Engine::Routing::Result
- Defined in:
- lib/charyf/engine/routing/result.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#skill ⇒ Object
readonly
Returns the value of attribute skill.
Instance Method Summary collapse
- #controller_class_name ⇒ Object
-
#initialize(skill, controller, action) ⇒ Result
constructor
A new instance of Result.
- #skill_class_name ⇒ Object
Constructor Details
#initialize(skill, controller, action) ⇒ Result
Returns a new instance of Result.
8 9 10 11 12 |
# File 'lib/charyf/engine/routing/result.rb', line 8 def initialize(skill, controller, action) @skill = skill @controller = controller @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
6 7 8 |
# File 'lib/charyf/engine/routing/result.rb', line 6 def action @action end |
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/charyf/engine/routing/result.rb', line 6 def controller @controller end |
#skill ⇒ Object (readonly)
Returns the value of attribute skill.
6 7 8 |
# File 'lib/charyf/engine/routing/result.rb', line 6 def skill @skill end |
Instance Method Details
#controller_class_name ⇒ Object
14 15 16 |
# File 'lib/charyf/engine/routing/result.rb', line 14 def controller_class_name [skill, controller.split("/")].flatten.compact.map(&:to_s).map(&:camelize).join("::") + "Controller" end |
#skill_class_name ⇒ Object
18 19 20 |
# File 'lib/charyf/engine/routing/result.rb', line 18 def skill_class_name skill.to_s.camelize if skill end |