Class: Query::Node::String

Inherits:
Query::Node show all
Defined in:
lib/query/node/string.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ String

Returns a new instance of String.



8
9
10
# File 'lib/query/node/string.rb', line 8

def initialize(parsed)
  self.string = parsed
end

Instance Attribute Details

#stringObject

Returns the value of attribute string.



6
7
8
# File 'lib/query/node/string.rb', line 6

def string
  @string
end

Instance Method Details

#evaluate(**args) ⇒ Object



12
13
14
# File 'lib/query/node/string.rb', line 12

def evaluate(**args)
  string.to_s
end