module BinData
Constants
- RegisteredClasses
A singleton registry of all registered classes.
- VERSION
Public Class Methods
trace_reading(io = STDERR) { || ... }
click to toggle source
Turn on trace information when reading a BinData
object. If block
is given then the tracing only occurs for
that block. This is useful for debugging a BinData declaration.
# File lib/bindata/trace.rb, line 26 def trace_reading(io = STDERR) @tracer = Tracer.new(io) [BasePrimitive, Choice].each(&:turn_on_tracing) if block_given? begin yield ensure [BasePrimitive, Choice].each(&:turn_off_tracing) @tracer = nil end end end
Private Instance Methods
trace_reading(io = STDERR) { || ... }
click to toggle source
Turn on trace information when reading a BinData
object. If block
is given then the tracing only occurs for
that block. This is useful for debugging a BinData declaration.
# File lib/bindata/trace.rb, line 26 def trace_reading(io = STDERR) @tracer = Tracer.new(io) [BasePrimitive, Choice].each(&:turn_on_tracing) if block_given? begin yield ensure [BasePrimitive, Choice].each(&:turn_off_tracing) @tracer = nil end end end