Class: Kawaii::Routing::NestedPath
- Inherits:
-
Object
- Object
- Kawaii::Routing::NestedPath
- Defined in:
- lib/kawaii/routing/nested_path.rb
Instance Attribute Summary collapse
-
#action_class ⇒ Object
readonly
Returns the value of attribute action_class.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource, action_class = nil) ⇒ NestedPath
constructor
A new instance of NestedPath.
Constructor Details
#initialize(resource, action_class = nil) ⇒ NestedPath
Returns a new instance of NestedPath.
4 5 6 7 8 |
# File 'lib/kawaii/routing/nested_path.rb', line 4 def initialize(resource, action_class = nil) @resource = resource @action_class = action_class @path = wrap_namespace(resource, calculate(resource)) end |
Instance Attribute Details
#action_class ⇒ Object (readonly)
Returns the value of attribute action_class.
9 10 11 |
# File 'lib/kawaii/routing/nested_path.rb', line 9 def action_class @action_class end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/kawaii/routing/nested_path.rb', line 9 def path @path end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
9 10 11 |
# File 'lib/kawaii/routing/nested_path.rb', line 9 def resource @resource end |