Class: GQL::Lazy
Instance Attribute Summary
Attributes inherited from Field
#ast_node, #context, #target, #variables
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Field
execute, #initialize, #scalar_value
Methods included from Mixins::Common
Constructor Details
This class inherits a constructor from GQL::Field
Class Method Details
.build_class(id, proc, options) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/gql/lazy.rb', line 8 def build_class(id, proc, ) Class.new(self).tap do |field_class| field_class.owner = .delete(:owner) field_class.type = .delete(:type) field_class.id = id field_class.proc = proc field_class. = end end |
Instance Method Details
#value ⇒ Object
32 33 34 35 36 37 |
# File 'lib/gql/lazy.rb', line 32 def value field_class = self.class.spur field = field_class.new(ast_node, target, variables, context) field.value end |