Module: Binstream::Tracking
- Included in:
- Streams::Base
- Defined in:
- lib/binstream/tracking.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #track(message = nil, &block) ⇒ Object
- #track_pos(stream) ⇒ Object
- #without_tracking(&block) ⇒ Object
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/binstream/tracking.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#track(message = nil, &block) ⇒ Object
7 8 9 |
# File 'lib/binstream/tracking.rb', line 7 def track( = nil, &block) ::Binstream::Tracker.instance.track(, &block) end |
#track_pos(stream) ⇒ Object
11 12 13 14 15 |
# File 'lib/binstream/tracking.rb', line 11 def track_pos(stream) track do "Pos=#{stream.tell}" end end |