Class: Natsuzora::AST::Variable

Inherits:
Node
  • Object
show all
Defined in:
lib/natsuzora/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Constructor Details

#initialize(path, modifier: nil) ⇒ Variable

modifier: nil (default), :nullable (?), :required (!)



36
37
38
39
40
# File 'lib/natsuzora/ast.rb', line 36

def initialize(path, modifier: nil, **)
  super(**)
  @path = path
  @modifier = modifier
end

Instance Attribute Details

#modifierObject (readonly)

Returns the value of attribute modifier.



33
34
35
# File 'lib/natsuzora/ast.rb', line 33

def modifier
  @modifier
end

#pathObject (readonly)

Returns the value of attribute path.



33
34
35
# File 'lib/natsuzora/ast.rb', line 33

def path
  @path
end