Class: Proc
- Defined in:
- lib/diamonds/opal/browser/delay.rb,
lib/diamonds/opal/browser/interval.rb,
lib/diamonds/opal/browser/immediate.rb,
lib/diamonds/opal/browser/animation_frame.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.
- #animation_frame ⇒ Object
- #defer(*args, &block) ⇒ Object
-
#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.
70 71 72 |
# File 'lib/diamonds/opal/browser/delay.rb', line 70 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.
75 76 77 |
# File 'lib/diamonds/opal/browser/delay.rb', line 75 def after!(time) $window.after!(time, &self) end |
#animation_frame ⇒ Object
108 109 110 |
# File 'lib/diamonds/opal/browser/animation_frame.rb', line 108 def animation_frame Browser::AnimationFrame.new($window, &self) end |
#defer(*args, &block) ⇒ Object
143 144 145 |
# File 'lib/diamonds/opal/browser/immediate.rb', line 143 def defer(*args, &block) Browser::Immediate.new(self, args, &block).tap(&:dispatch) end |