Class: Rvim::Lua::Loop::Timer

Inherits:
Struct
  • Object
show all
Defined in:
lib/rvim/lua/loop.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#callbackObject

Returns the value of attribute callback

Returns:

  • (Object)

    the current value of callback



22
23
24
# File 'lib/rvim/lua/loop.rb', line 22

def callback
  @callback
end

#deadline_atObject

Returns the value of attribute deadline_at

Returns:

  • (Object)

    the current value of deadline_at



22
23
24
# File 'lib/rvim/lua/loop.rb', line 22

def deadline_at
  @deadline_at
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



22
23
24
# File 'lib/rvim/lua/loop.rb', line 22

def id
  @id
end

#repeat_msObject

Returns the value of attribute repeat_ms

Returns:

  • (Object)

    the current value of repeat_ms



22
23
24
# File 'lib/rvim/lua/loop.rb', line 22

def repeat_ms
  @repeat_ms
end

#stoppedObject

Returns the value of attribute stopped

Returns:

  • (Object)

    the current value of stopped



22
23
24
# File 'lib/rvim/lua/loop.rb', line 22

def stopped
  @stopped
end

Instance Method Details

#fire_now?(now) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/rvim/lua/loop.rb', line 23

def fire_now?(now)
  !stopped && deadline_at <= now
end