Class: Axn::Core::FieldResolvers::Model
- Inherits:
-
Object
- Object
- Axn::Core::FieldResolvers::Model
- Defined in:
- lib/axn/core/field_resolvers/model.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(field:, options:, provided_data:, permit_method_call: false) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(field:, options:, provided_data:, permit_method_call: false) ⇒ Model
Returns a new instance of Model.
7 8 9 10 11 12 |
# File 'lib/axn/core/field_resolvers/model.rb', line 7 def initialize(field:, options:, provided_data:, permit_method_call: false) @field = field @options = @provided_data = provided_data @permit_method_call = permit_method_call end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/axn/core/field_resolvers/model.rb', line 14 def call provided_value.presence || derive_value end |