Class: GQL::Mixins::HasCalls::LazyCall

Inherits:
Object
  • Object
show all
Defined in:
lib/gql/mixins/has_calls.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(call_class_name) ⇒ LazyCall

Returns a new instance of LazyCall.



124
125
126
# File 'lib/gql/mixins/has_calls.rb', line 124

def initialize(call_class_name)
  @call_class_name = call_class_name
end

Instance Attribute Details

#call_class_nameObject (readonly)

Returns the value of attribute call_class_name.



121
122
123
# File 'lib/gql/mixins/has_calls.rb', line 121

def call_class_name
  @call_class_name
end

#idObject

Returns the value of attribute id.



122
123
124
# File 'lib/gql/mixins/has_calls.rb', line 122

def id
  @id
end

#result_classObject

Returns the value of attribute result_class.



122
123
124
# File 'lib/gql/mixins/has_calls.rb', line 122

def result_class
  @result_class
end

Instance Method Details

#execute(caller_class, ast_node, target, variables, context) ⇒ Object



128
129
130
131
# File 'lib/gql/mixins/has_calls.rb', line 128

def execute(caller_class, ast_node, target, variables, context)
  spurred = spur_call_class(caller_class, id)
  spurred.execute caller_class, ast_node, target, variables, context
end

#parametersObject



133
134
135
# File 'lib/gql/mixins/has_calls.rb', line 133

def parameters
  call_class.parameters
end