Class: Attributes::Value
- Inherits:
-
String
- Object
- String
- Attributes::Value
- Defined in:
- lib/rexleparser.rb
Instance Method Summary collapse
- #<(val2) ⇒ Object
- #>(val2) ⇒ Object
-
#initialize(value) ⇒ Value
constructor
A new instance of Value.
- #inspect ⇒ Object
- #to_s(unescape: true) ⇒ Object
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 |
#inspect ⇒ Object
24 25 26 |
# File 'lib/rexleparser.rb', line 24 def inspect() super().gsub('<','<',).gsub('>','>').gsub('&pos;',"'") end |
#to_s(unescape: true) ⇒ Object
28 29 30 |
# File 'lib/rexleparser.rb', line 28 def to_s(unescape: true) unescape ? self.gsub('&','&').gsub('&pos;',"'") : self end |