Class: RSpec::GraphqlAssistant::ResponseBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/graphql_assistant/response_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments_arr) ⇒ ResponseBuilder

Returns a new instance of ResponseBuilder.



6
7
8
# File 'lib/rspec/graphql_assistant/response_builder.rb', line 6

def initialize(arguments_arr)
  @arguments_arr = arguments_arr
end

Instance Attribute Details

#arguments_arrObject (readonly)

Returns the value of attribute arguments_arr.



4
5
6
# File 'lib/rspec/graphql_assistant/response_builder.rb', line 4

def arguments_arr
  @arguments_arr
end

Instance Method Details

#callObject



10
11
12
13
14
15
16
# File 'lib/rspec/graphql_assistant/response_builder.rb', line 10

def call
  result = []
  arguments_arr.each do |arg|
    result << process_root(arg)
  end
  result.join " "
end