Class: Azeroth::RoutesBuilder Private
- Inherits:
-
Object
- Object
- Azeroth::RoutesBuilder
- Defined in:
- lib/azeroth/routes_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Builder resposible for adding routes methods to the controller
Instance Method Summary collapse
-
#append ⇒ Array<Sinclair::MethodDefinition>
private
Append the routes methods to be built.
-
#initialize(model, builder, options) ⇒ RoutesBuilder
constructor
private
A new instance of RoutesBuilder.
Constructor Details
#initialize(model, builder, options) ⇒ RoutesBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RoutesBuilder.
12 13 14 15 16 |
# File 'lib/azeroth/routes_builder.rb', line 12 def initialize(model, builder, ) @model = model @builder = builder @options = end |
Instance Method Details
#append ⇒ Array<Sinclair::MethodDefinition>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Append the routes methods to be built
21 22 23 24 25 |
# File 'lib/azeroth/routes_builder.rb', line 21 def append .actions.each do |route| add_method(route, &route_code(route)) end end |