Class: Yap::Shell::Parser::Nodes::CommandSubstitutionNode

Inherits:
Object
  • Object
show all
Includes:
Visitor
Defined in:
lib/yap/shell/parser/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Visitor

#accept

Constructor Details

#initialize(node) ⇒ CommandSubstitutionNode

Returns a new instance of CommandSubstitutionNode.



273
274
275
# File 'lib/yap/shell/parser/nodes.rb', line 273

def initialize(node)
  @node = node
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



271
272
273
# File 'lib/yap/shell/parser/nodes.rb', line 271

def node
  @node
end

#tailObject

Returns the value of attribute tail.



270
271
272
# File 'lib/yap/shell/parser/nodes.rb', line 270

def tail
  @tail
end

Instance Method Details

#inspectObject



281
282
283
# File 'lib/yap/shell/parser/nodes.rb', line 281

def inspect
  to_s
end

#to_s(indent: 0) ⇒ Object



277
278
279
# File 'lib/yap/shell/parser/nodes.rb', line 277

def to_s(indent:0)
  "CommandSubstitutionNode(#{@node.to_s}, tail: #{tail.inspect})"
end