Class: RxRuby::Recorded

Inherits:
Struct
  • Object
show all
Defined in:
lib/rx_ruby/testing/recorded.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(time, value) ⇒ Recorded

Returns a new instance of Recorded.



8
9
10
# File 'lib/rx_ruby/testing/recorded.rb', line 8

def initialize(time, value)
  super
end

Instance Attribute Details

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



6
7
8
# File 'lib/rx_ruby/testing/recorded.rb', line 6

def time
  @time
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



6
7
8
# File 'lib/rx_ruby/testing/recorded.rb', line 6

def value
  @value
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/rx_ruby/testing/recorded.rb', line 12

def to_s
  "#{value} @ #{time}"
end