Class: Graphlyte::Syntax::Argument

Inherits:
Data
  • Object
show all
Defined in:
lib/graphlyte/syntax.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Data

#==, attr_accessor, attr_reader, attributes, #dup, #eql?, #hash, #inspect

Constructor Details

#initialize(name = nil, value = nil, **kwargs) ⇒ Argument

Returns a new instance of Argument.



47
48
49
50
51
# File 'lib/graphlyte/syntax.rb', line 47

def initialize(name = nil, value = nil, **kwargs)
  super(**kwargs)
  @name = name if name
  @value = value if value
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



45
46
47
# File 'lib/graphlyte/syntax.rb', line 45

def name
  @name
end

#valueObject

Returns the value of attribute value.



45
46
47
# File 'lib/graphlyte/syntax.rb', line 45

def value
  @value
end