Class: Foxbat::FBPhaser
- Inherits:
-
Object
- Object
- Foxbat::FBPhaser
- Defined in:
- lib/foxbat/barrier.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
writeonly
Sets the attribute callback.
-
#limit ⇒ Object
writeonly
Sets the attribute limit.
Instance Method Summary collapse
Instance Attribute Details
#callback=(value) ⇒ Object (writeonly)
Sets the attribute callback
7 8 9 |
# File 'lib/foxbat/barrier.rb', line 7 def callback=(value) @callback = value end |
#limit=(value) ⇒ Object (writeonly)
Sets the attribute limit
7 8 9 |
# File 'lib/foxbat/barrier.rb', line 7 def limit=(value) @limit = value end |
Instance Method Details
#onAdvance(phase, parties) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/foxbat/barrier.rb', line 9 def onAdvance(phase, parties) if (phase + 1) == @limit true else @callback.call if @callback false end end |