Class: ActiveGraphql::Client::Actions::Action::FormatVariableInputs

Inherits:
Object
  • Object
show all
Includes:
VariableDetectable
Defined in:
lib/active_graphql/client/actions/action/format_variable_inputs.rb

Overview

converts ruby object in to varbiable stype grapqhl input

Instance Method Summary collapse

Methods included from VariableDetectable

#variable_attributes, #variable_value?

Constructor Details

#initialize(inputs) ⇒ FormatVariableInputs

Returns a new instance of FormatVariableInputs.



11
12
13
# File 'lib/active_graphql/client/actions/action/format_variable_inputs.rb', line 11

def initialize(inputs)
  @initial_inputs = inputs
end

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/active_graphql/client/actions/action/format_variable_inputs.rb', line 15

def call
  return '' if inputs.empty?

  formatted_attributes(inputs)
end