Class: ApiMaker::BaseCollectionInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/api_maker/base_collection_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ability:, api_maker_args:, collection:, commands:, command_response:, controller:) ⇒ BaseCollectionInstance

Returns a new instance of BaseCollectionInstance.



7
8
9
10
11
12
13
14
# File 'lib/api_maker/base_collection_instance.rb', line 7

def initialize(ability:, api_maker_args:, collection:, commands:, command_response:, controller:)
  @api_maker_args = api_maker_args
  @current_ability = ability
  @collection = collection
  @commands = commands
  @command_response = command_response
  @controller = controller
end

Instance Attribute Details

#api_maker_argsObject (readonly)

Returns the value of attribute api_maker_args.



5
6
7
# File 'lib/api_maker/base_collection_instance.rb', line 5

def api_maker_args
  @api_maker_args
end

#collectionObject

Returns the value of attribute collection.



4
5
6
# File 'lib/api_maker/base_collection_instance.rb', line 4

def collection
  @collection
end

#command_responseObject (readonly)

Returns the value of attribute command_response.



5
6
7
# File 'lib/api_maker/base_collection_instance.rb', line 5

def command_response
  @command_response
end

#commandsObject (readonly)

Returns the value of attribute commands.



5
6
7
# File 'lib/api_maker/base_collection_instance.rb', line 5

def commands
  @commands
end

#controllerObject (readonly)

Returns the value of attribute controller.



5
6
7
# File 'lib/api_maker/base_collection_instance.rb', line 5

def controller
  @controller
end

#current_abilityObject (readonly)

Returns the value of attribute current_ability.



5
6
7
# File 'lib/api_maker/base_collection_instance.rb', line 5

def current_ability
  @current_ability
end