Class: ApiMaker::PermittedParamsArgument

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command:, model:) ⇒ PermittedParamsArgument

Returns a new instance of PermittedParamsArgument.



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

def initialize(command:, model:)
  @command = command
  @model = model
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



2
3
4
# File 'lib/api_maker/permitted_params_argument.rb', line 2

def command
  @command
end

#modelObject (readonly)

Returns the value of attribute model.



2
3
4
# File 'lib/api_maker/permitted_params_argument.rb', line 2

def model
  @model
end

Instance Method Details

#paramsObject



9
10
11
# File 'lib/api_maker/permitted_params_argument.rb', line 9

def params
  command.args
end