Class: Kawaii::Routing::NestedPath

Inherits:
Object
  • Object
show all
Defined in:
lib/kawaii/routing/nested_path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_classObject (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

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/kawaii/routing/nested_path.rb', line 9

def path
  @path
end

#resourceObject (readonly)

Returns the value of attribute resource.



9
10
11
# File 'lib/kawaii/routing/nested_path.rb', line 9

def resource
  @resource
end