Class: EmberRoutes::Route
- Inherits:
-
Object
- Object
- EmberRoutes::Route
- Defined in:
- lib/ember_routes/route.rb,
lib/ember_route_helpers/route.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(name, opts = {}) ⇒ Route
constructor
A new instance of Route.
- #route(*arguments, &block) ⇒ Object
Constructor Details
#initialize(name, opts = {}) ⇒ Route
Returns a new instance of Route.
4 5 6 7 8 |
# File 'lib/ember_routes/route.rb', line 4 def initialize(name, opts = {}) @name = name.to_s @path = opts.fetch(:path, name) @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
3 4 5 |
# File 'lib/ember_routes/route.rb', line 3 def children @children end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ember_routes/route.rb', line 3 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/ember_routes/route.rb', line 3 def path @path end |