Module: Lab42::StateMachine::Controller::StreamApi
- Extended by:
- Forwarder
- Included in:
- Lab42::StateMachine::Controller
- Defined in:
- lib/lab42/state_machine/controller/stream_api.rb
Instance Method Summary collapse
- #drop_until(&condition) ⇒ Object
- #drop_until!(&condition) ⇒ Object
- #drop_while(&condition) ⇒ Object
- #drop_while!(&condition) ⇒ Object
- #rewind! ⇒ Object
Instance Method Details
#drop_until(&condition) ⇒ Object
16 17 18 |
# File 'lib/lab42/state_machine/controller/stream_api.rb', line 16 def drop_until &condition @stream = stream.drop_while( &condition.negated ) end |
#drop_until!(&condition) ⇒ Object
19 20 21 22 |
# File 'lib/lab42/state_machine/controller/stream_api.rb', line 19 def drop_until! &condition drop_until( &condition ) @sm.skip end |
#drop_while(&condition) ⇒ Object
24 25 26 |
# File 'lib/lab42/state_machine/controller/stream_api.rb', line 24 def drop_while &condition @stream = stream.drop_while( &condition ) end |
#drop_while!(&condition) ⇒ Object
27 28 29 30 |
# File 'lib/lab42/state_machine/controller/stream_api.rb', line 27 def drop_while! &condition drop_while( &condition ) @sm.skip end |
#rewind! ⇒ Object
32 33 34 35 |
# File 'lib/lab42/state_machine/controller/stream_api.rb', line 32 def rewind! rewind @sm.skip end |