Class: RSpec::GraphqlAssistant::QueryBuilder
- Inherits:
-
Object
- Object
- RSpec::GraphqlAssistant::QueryBuilder
- Defined in:
- lib/rspec/graphql_assistant/query_builder.rb
Instance Attribute Summary collapse
-
#input_args ⇒ Object
readonly
Returns the value of attribute input_args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resp_args ⇒ Object
readonly
Returns the value of attribute resp_args.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(type, name, input_args, resp_args) ⇒ QueryBuilder
constructor
A new instance of QueryBuilder.
Constructor Details
#initialize(type, name, input_args, resp_args) ⇒ QueryBuilder
Returns a new instance of QueryBuilder.
5 6 7 8 9 10 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 5 def initialize(type, name, input_args, resp_args) @type = type @name = name @input_args = input_args @resp_args = resp_args end |
Instance Attribute Details
#input_args ⇒ Object (readonly)
Returns the value of attribute input_args.
4 5 6 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 4 def input_args @input_args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 4 def name @name end |
#resp_args ⇒ Object (readonly)
Returns the value of attribute resp_args.
4 5 6 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 4 def resp_args @resp_args end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 4 def type @type end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'lib/rspec/graphql_assistant/query_builder.rb', line 13 def call template % {type: type, name: name, input_args: transform_input_args(input_args), resp_args: transform_resp_args(resp_args)} end |