Class: Proc
- Defined in:
- lib/reactive_record/interval.rb,
lib/reactive_record/interval.rb
Instance Method Summary collapse
-
#after(time) ⇒ Delay
Execute a block after the given seconds.
-
#after!(time) ⇒ Delay
Execute a block after the given seconds, you have to call [#start] on it yourself.
-
#every(time) ⇒ Interval
Execute the block every given seconds.
-
#every!(time) ⇒ Interval
Execute the block every given seconds, you have to call [#start] on it yourself.
Instance Method Details
#after(time) ⇒ Delay
Execute a block after the given seconds.
182 183 184 |
# File 'lib/reactive_record/interval.rb', line 182 def after(time) $window.after(time, &self) end |
#after!(time) ⇒ Delay
Execute a block after the given seconds, you have to call [#start] on it yourself.
187 188 189 |
# File 'lib/reactive_record/interval.rb', line 187 def after!(time) $window.after!(time, &self) end |
#every(time) ⇒ Interval
Execute the block every given seconds.
103 104 105 |
# File 'lib/reactive_record/interval.rb', line 103 def every(time) $window.every(time, &self) end |
#every!(time) ⇒ Interval
Execute the block every given seconds, you have to call [#start] on it yourself.
108 109 110 |
# File 'lib/reactive_record/interval.rb', line 108 def every!(time) $window.every!(time, &self) end |