Class: Attributes::Value

Inherits:
String
  • Object
show all
Defined in:
lib/rexleparser.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Value

Returns a new instance of Value.



11
12
13
14
# File 'lib/rexleparser.rb', line 11

def initialize(value)
  #jr2020-04-30 super(value.gsub("'", '''))
  super(value)
end

Instance Method Details

#<(val2) ⇒ Object



16
17
18
# File 'lib/rexleparser.rb', line 16

def <(val2)
  self.to_f < val2.to_f
end

#>(val2) ⇒ Object



20
21
22
# File 'lib/rexleparser.rb', line 20

def >(val2)
  self.to_f > val2.to_f
end

#inspectObject



24
25
26
# File 'lib/rexleparser.rb', line 24

def inspect()
  super().gsub('&lt;','<',).gsub('&gt;','>').gsub('&pos;',"'")
end

#to_sObject



28
29
30
# File 'lib/rexleparser.rb', line 28

def to_s()
  self.gsub('&lt;','<',).gsub('&gt;','>').gsub('&pos;',"'")
end