class Gammo::XPath::AST::Value::String
@!visibility private
Public Class Methods
new(value)
click to toggle source
Calls superclass method
Gammo::XPath::AST::Value::new
# File lib/gammo/xpath/ast/value.rb, line 122 def initialize(value) super # TODO: Get rid of these slices. These should be taken care by # the parsing layer. @value = @value.slice(1..-1) if value.start_with?(?") @value = @value.slice(0..-2) if value.end_with?(?") end
Public Instance Methods
string?()
click to toggle source
# File lib/gammo/xpath/ast/value.rb, line 143 def string? true end
to_bool()
click to toggle source
# File lib/gammo/xpath/ast/value.rb, line 130 def to_bool !value.empty? end
to_number()
click to toggle source
# File lib/gammo/xpath/ast/value.rb, line 134 def to_number # TODO value.to_i end
to_s()
click to toggle source
# File lib/gammo/xpath/ast/value.rb, line 139 def to_s value end