class SyntaxTree::TStringEnd

TStringEnd represents the end of a string literal.

"string"

In the example above, TStringEnd represents the second set of quotes. Strings can also use single quotes. They can also be declared using the +%q+ and +%Q+ syntax, as in:

%q{string}

Attributes

value[R]
String

the end of the string

Public Class Methods

new(value:, location:) click to toggle source
# File lib/syntax_tree/node.rb, line 11042
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 11068
def ===(other)
  other.is_a?(TStringEnd) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 11047
def accept(visitor)
  visitor.visit_tstring_end(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 11051
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 11055
def copy(value: nil, location: nil)
  TStringEnd.new(
    value: value || self.value,
    location: location || self.location
  )
end
deconstruct()
Alias for: child_nodes
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/node.rb, line 11064
def deconstruct_keys(_keys)
  { value: value, location: location }
end