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
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
24 25 26 27 28 29 |
# File 'lib/gql/lazy.rb', line 24 def value field_class = self.class.resolve field = field_class.new(ast_node, target, variables, context) field.value end |