Class: RSpec::GraphqlAssistant::ResponseBuilder
- Inherits:
-
Object
- Object
- RSpec::GraphqlAssistant::ResponseBuilder
- Defined in:
- lib/rspec/graphql_assistant/response_builder.rb
Instance Attribute Summary collapse
-
#arguments_arr ⇒ Object
readonly
Returns the value of attribute arguments_arr.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(arguments_arr) ⇒ ResponseBuilder
constructor
A new instance of ResponseBuilder.
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_arr ⇒ Object (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
#call ⇒ Object
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 |