Class: TinyGQL::Nodes::InputValueDefinition
- Defined in:
- lib/tinygql/nodes.rb
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#directives ⇒ Object
readonly
Returns the value of attribute directives.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(viz) ⇒ Object
- #children ⇒ Object
- #fold(viz, seed) ⇒ Object
-
#initialize(pos, description, name, type, default_value, directives) ⇒ InputValueDefinition
constructor
A new instance of InputValueDefinition.
- #input_value_definition? ⇒ Boolean
Methods inherited from Node
#argument?, #boolean_value?, #directive?, #directive_definition?, #document?, #each, #enum_type_definition?, #enum_type_extension?, #enum_value?, #enum_value_definition?, #executable_directive_location?, #field?, #field_definition?, #float_value?, #fragment_definition?, #fragment_spread?, #inline_fragment?, #input_object_type_definition?, #input_object_type_extension?, #int_value?, #interface_type_definition?, #interface_type_extension?, #line, #list_type?, #list_value?, #named_type?, #not_null_type?, #null_value?, #object_field?, #object_type_definition?, #object_type_extension?, #object_value?, #operation_definition?, #root_operation_type_definition?, #scalar_type_definition?, #scalar_type_extension?, #schema_definition?, #string_value?, #type_condition?, #type_system_directive_location?, #union_type_definition?, #union_type_extension?, #value?, #variable?, #variable_definition?
Constructor Details
#initialize(pos, description, name, type, default_value, directives) ⇒ InputValueDefinition
Returns a new instance of InputValueDefinition.
628 629 630 631 632 633 634 635 |
# File 'lib/tinygql/nodes.rb', line 628 def initialize pos, description, name, type, default_value, directives super(pos) @description = description @name = name @type = type @default_value = default_value @directives = directives end |
Instance Attribute Details
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
626 627 628 |
# File 'lib/tinygql/nodes.rb', line 626 def default_value @default_value end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
626 627 628 |
# File 'lib/tinygql/nodes.rb', line 626 def description @description end |
#directives ⇒ Object (readonly)
Returns the value of attribute directives.
626 627 628 |
# File 'lib/tinygql/nodes.rb', line 626 def directives @directives end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
626 627 628 |
# File 'lib/tinygql/nodes.rb', line 626 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
626 627 628 |
# File 'lib/tinygql/nodes.rb', line 626 def type @type end |
Instance Method Details
#accept(viz) ⇒ Object
637 638 639 |
# File 'lib/tinygql/nodes.rb', line 637 def accept viz viz.handle_input_value_definition self end |
#children ⇒ Object
647 648 649 |
# File 'lib/tinygql/nodes.rb', line 647 def children ary = []; ary << description if description; ary << type; ary << default_value if default_value; ary.concat(directives) if directives; ary end |
#fold(viz, seed) ⇒ Object
641 642 643 |
# File 'lib/tinygql/nodes.rb', line 641 def fold viz, seed viz.handle_input_value_definition self, seed end |
#input_value_definition? ⇒ Boolean
645 |
# File 'lib/tinygql/nodes.rb', line 645 def input_value_definition?; true; end |