Method: Mobx::Utils#wrappedOnce
- Defined in:
- lib/mobx/utils.rb
#wrappedOnce(name, object, &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/mobx/utils.rb', line 19 def wrappedOnce(name, object, &block) Thread.current['mobx'][name] ||= object block.call Thread.current['mobx'][name] = nil end |