Class: ActiveGraphql::Client::Actions::Action::FormatInputs
- Inherits:
-
Object
- Object
- ActiveGraphql::Client::Actions::Action::FormatInputs
- Includes:
- VariableDetectable
- Defined in:
- lib/active_graphql/client/actions/action/format_inputs.rb
Overview
converts ruby object in to grapqhl input string
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inputs) ⇒ FormatInputs
constructor
A new instance of FormatInputs.
Methods included from VariableDetectable
#variable_attributes, #variable_value?
Constructor Details
#initialize(inputs) ⇒ FormatInputs
Returns a new instance of FormatInputs.
11 12 13 |
# File 'lib/active_graphql/client/actions/action/format_inputs.rb', line 11 def initialize(inputs) @inputs = inputs end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 |
# File 'lib/active_graphql/client/actions/action/format_inputs.rb', line 15 def call return '' if inputs.empty? formatted(inputs) end |