Class: TypedParams::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/typed_params/handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(for:, schema:, action: nil, format: nil) ⇒ Handler

Returns a new instance of Handler.



10
11
12
13
14
15
# File 'lib/typed_params/handler.rb', line 10

def initialize(for:, schema:, action: nil, format: nil)
  @for    = binding.local_variable_get(:for)
  @schema = schema
  @action = action
  @format = format
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



5
6
7
# File 'lib/typed_params/handler.rb', line 5

def action
  @action
end

#forObject (readonly)

Returns the value of attribute for.



5
6
7
# File 'lib/typed_params/handler.rb', line 5

def for
  @for
end

#formatObject (readonly)

Returns the value of attribute format.



5
6
7
# File 'lib/typed_params/handler.rb', line 5

def format
  @format
end

#schemaObject (readonly)

Returns the value of attribute schema.



5
6
7
# File 'lib/typed_params/handler.rb', line 5

def schema
  @schema
end