Class: AnyValue::Increasing
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize ⇒ Increasing
constructor
A new instance of Increasing.
- #inspect ⇒ Object
Methods inherited from Anything
Constructor Details
#initialize ⇒ Increasing
Returns a new instance of Increasing.
225 226 227 228 |
# File 'lib/any_value.rb', line 225 def initialize @last = nil @for_inspect = nil end |
Instance Method Details
#==(o) ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/any_value.rb', line 230 def ==(o) @for_inspect = @last if @last result = o > @last @last = o result else @last = o super end end |
#inspect ⇒ Object
242 243 244 |
# File 'lib/any_value.rb', line 242 def inspect "#<Increasing last=#{@for_inspect.inspect}>" end |