Class: Rx::TimeInterval

Inherits:
Struct
  • Object
show all
Defined in:
lib/rx/core/time_interval.rb

Overview

Record of a value including the virtual time it was produced on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interval, value) ⇒ TimeInterval

Returns a new instance of TimeInterval.



8
9
10
# File 'lib/rx/core/time_interval.rb', line 8

def initialize(interval, value)
  super
end

Instance Attribute Details

#intervalObject

Returns the value of attribute interval

Returns:

  • (Object)

    the current value of interval



6
7
8
# File 'lib/rx/core/time_interval.rb', line 6

def interval
  @interval
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



6
7
8
# File 'lib/rx/core/time_interval.rb', line 6

def value
  @value
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/rx/core/time_interval.rb', line 12

def to_s
  "(#{value})@(#{interval})"
end