Class: Azeroth::Resourceable::ResourcesBuilder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/azeroth/resourceable/resources_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 responsible to add resource / model methods to the controller

Builder uses Azeroth::ResourceBuilder to put together it’s methods

Instance Method Summary collapse

Constructor Details

#initialize(klass, model_name, options) ⇒ ResourcesBuilder

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 ResourcesBuilder.

Parameters:

  • klass (ActionController::Base)

    Controller to to be changed

  • model_name (Symbol, String)
  • options (Options)


18
19
20
21
22
23
24
25
26
# File 'lib/azeroth/resourceable/resources_builder.rb', line 18

def initialize(klass, model_name, options)
  @klass = klass
  @options = options
  @model = Azeroth::Model.new(model_name, options)

  add_params
  add_resource
  add_helpers
end