Class: TinyGQL::Nodes::Argument
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(viz) ⇒ Object
- #argument? ⇒ Boolean
- #children ⇒ Object
- #fold(viz, seed) ⇒ Object
-
#initialize(name, value) ⇒ Argument
constructor
A new instance of Argument.
Methods inherited from Node
#boolean_value?, #directive?, #directive_definition?, #document?, #each, #enum_type_definition?, #enum_value?, #enum_value_definition?, #executable_directive_location?, #field?, #field_definition?, #float_value?, #fragment_definition?, #fragment_spread?, #inline_fragment?, #input_object_type_definition?, #input_value_definition?, #int_value?, #interface_type_definition?, #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?, #schema_definition?, #string_value?, #type_condition?, #type_system_directive_location?, #union_type_definition?, #value?, #variable?, #variable_definition?
Constructor Details
#initialize(name, value) ⇒ Argument
Returns a new instance of Argument.
228 229 230 231 |
# File 'lib/tinygql/nodes.rb', line 228 def initialize name, value @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
226 227 228 |
# File 'lib/tinygql/nodes.rb', line 226 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
226 227 228 |
# File 'lib/tinygql/nodes.rb', line 226 def value @value end |
Instance Method Details
#accept(viz) ⇒ Object
233 234 235 |
# File 'lib/tinygql/nodes.rb', line 233 def accept viz viz.handle_argument self end |
#argument? ⇒ Boolean
241 |
# File 'lib/tinygql/nodes.rb', line 241 def argument? = true |
#children ⇒ Object
243 244 245 |
# File 'lib/tinygql/nodes.rb', line 243 def children ary = []; ary << value; ary end |
#fold(viz, seed) ⇒ Object
237 238 239 |
# File 'lib/tinygql/nodes.rb', line 237 def fold viz, seed viz.handle_argument self, seed end |