Class: JPath::Parser::Literal

Inherits:
Object
  • Object
show all
Defined in:
lib/jpath/parser/formula.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Literal

Returns a new instance of Literal.



186
187
188
# File 'lib/jpath/parser/formula.rb', line 186

def initialize(string)
  @string = string
end

Instance Attribute Details

#stringObject (readonly)

Returns the value of attribute string.



184
185
186
# File 'lib/jpath/parser/formula.rb', line 184

def string
  @string
end

Instance Method Details

#boolean?Boolean

Returns:

  • (Boolean)


194
195
196
# File 'lib/jpath/parser/formula.rb', line 194

def boolean?
  false
end

#to_sObject



198
199
200
# File 'lib/jpath/parser/formula.rb', line 198

def to_s
  string.inspect
end

#value(*args) ⇒ Object



190
191
192
# File 'lib/jpath/parser/formula.rb', line 190

def value(*args)
  string
end