Class: TypedParams::Handler
- Inherits:
-
Object
- Object
- TypedParams::Handler
- Defined in:
- lib/typed_params/handler.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#for ⇒ Object
readonly
Returns the value of attribute for.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(for:, schema:, action: nil, format: nil) ⇒ Handler
constructor
A new instance of Handler.
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
#action ⇒ Object
Returns the value of attribute action.
5 6 7 |
# File 'lib/typed_params/handler.rb', line 5 def action @action end |
#for ⇒ Object (readonly)
Returns the value of attribute for.
5 6 7 |
# File 'lib/typed_params/handler.rb', line 5 def for @for end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/typed_params/handler.rb', line 5 def format @format end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
5 6 7 |
# File 'lib/typed_params/handler.rb', line 5 def schema @schema end |