Class: GQL::Field

Inherits:
Node
  • Object
show all
Defined in:
lib/gql/field.rb

Defined Under Namespace

Classes: Method

Instance Attribute Summary

Attributes inherited from Node

#ast_node, #context, #target, #variables

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Node

call, cursor, field, #initialize, method_missing, #value, #value_of_call, #value_of_field, #value_of_fields

Constructor Details

This class inherits a constructor from GQL::Node

Class Method Details

.build_class(method, options = {}) ⇒ Object



20
21
22
23
24
# File 'lib/gql/field.rb', line 20

def build_class(method, options = {})
  Class.new(self).tap do |field_class|
    field_class.method = method
  end
end

Instance Method Details

#raw_valueObject



27
28
29
# File 'lib/gql/field.rb', line 27

def raw_value
  target
end