Class: Azeroth::RoutesBuilder Private

Inherits:
Sinclair::Model
  • Object
show all
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

Author:

  • Darthjee

Instance Method Summary collapse

Constructor Details

#initialize(model: , builder: , options: ) ⇒ RoutesBuilder

Parameters:

  • model (Model) (defaults to: )

    resource interface

  • builder (Sinclair) (defaults to: )

    methods builder

  • options (Option) (defaults to: )


# File 'lib/azeroth/routes_builder.rb', line 11

Instance Method Details

#appendArray<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

Returns:

  • (Array<Sinclair::MethodDefinition>)


20
21
22
23
24
# File 'lib/azeroth/routes_builder.rb', line 20

def append
  options.actions.each do |route|
    add_method(route, &route_code(route))
  end
end