Class: RSpec::EM::FakeClock::Timeout

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/rspec/eventmachine/fake_clock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block, interval, repeat) ⇒ Timeout

Returns a new instance of Timeout.



40
41
42
43
44
# File 'lib/rspec/eventmachine/fake_clock.rb', line 40

def initialize(block, interval, repeat)
  @block    = block
  @interval = interval
  @repeat   = repeat
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



38
39
40
# File 'lib/rspec/eventmachine/fake_clock.rb', line 38

def block
  @block
end

#intervalObject (readonly)

Returns the value of attribute interval.



38
39
40
# File 'lib/rspec/eventmachine/fake_clock.rb', line 38

def interval
  @interval
end

#repeatObject (readonly)

Returns the value of attribute repeat.



38
39
40
# File 'lib/rspec/eventmachine/fake_clock.rb', line 38

def repeat
  @repeat
end

#timeObject

Returns the value of attribute time.



37
38
39
# File 'lib/rspec/eventmachine/fake_clock.rb', line 37

def time
  @time
end

Instance Method Details

#<=>(other) ⇒ Object



46
47
48
# File 'lib/rspec/eventmachine/fake_clock.rb', line 46

def <=>(other)
  @time - other.time
end