Module: BinData
- Extended by:
- BitFieldFactory, IntFactory
- Defined in:
- lib/bindata/io.rb,
lib/bindata/dsl.rb,
lib/bindata/int.rb,
lib/bindata/base.rb,
lib/bindata/bits.rb,
lib/bindata/lazy.rb,
lib/bindata/name.rb,
lib/bindata/rest.rb,
lib/bindata/skip.rb,
lib/bindata/array.rb,
lib/bindata/float.rb,
lib/bindata/trace.rb,
lib/bindata/buffer.rb,
lib/bindata/choice.rb,
lib/bindata/params.rb,
lib/bindata/record.rb,
lib/bindata/string.rb,
lib/bindata/struct.rb,
lib/bindata/section.rb,
lib/bindata/stringz.rb,
lib/bindata/version.rb,
lib/bindata/virtual.rb,
lib/bindata/registry.rb,
lib/bindata/sanitize.rb,
lib/bindata/warnings.rb,
lib/bindata/alignment.rb,
lib/bindata/framework.rb,
lib/bindata/primitive.rb,
lib/bindata/delayed_io.rb,
lib/bindata/uint8_array.rb,
lib/bindata/transform/xz.rb,
lib/bindata/transform/lz4.rb,
lib/bindata/transform/xor.rb,
lib/bindata/base_primitive.rb,
lib/bindata/transform/lzma.rb,
lib/bindata/transform/zlib.rb,
lib/bindata/transform/zstd.rb,
lib/bindata/transform/brotli.rb,
lib/bindata/count_bytes_remaining.rb
Defined Under Namespace
Modules: AcceptedParametersPlugin, BitAligned, BitField, BitFieldFactory, CopyOnChangePlugin, DSLMixin, FloatingPoint, Framework, IO, Int, IntFactory, MultiFieldArgSeparator, RegisterNamePlugin, TraceHook, Transform Classes: Array, ArrayArgProcessor, Base, BaseArgProcessor, BasePrimitive, Buffer, BufferArgProcessor, Choice, ChoiceArgProcessor, CountBytesRemaining, DelayedIO, DelayedIoArgProcessor, DoubleBe, DoubleLe, FloatBe, FloatLe, Int8, LazyEvaluator, Primitive, PrimitiveArgProcessor, Record, RecordArgProcessor, Registry, Rest, ResumeByteAlignment, SanitizedBigEndian, SanitizedChoices, SanitizedField, SanitizedFields, SanitizedLittleEndian, SanitizedParameter, SanitizedParameters, SanitizedPrototype, Section, SectionArgProcessor, Skip, SkipArgProcessor, String, StringArgProcessor, Stringz, Struct, StructArgProcessor, Tracer, Uint8, Uint8Array, Uint8ArrayArgProcessor, UnRegisteredTypeError, ValidityError, Virtual
Constant Summary collapse
Class Method Summary collapse
-
.trace_message {|@tracer| ... } ⇒ Object
:nodoc:.
-
.trace_reading(io = STDERR) ⇒ Object
Turn on trace information when reading a BinData object.
Methods included from IntFactory
Methods included from BitFieldFactory
Class Method Details
.trace_message {|@tracer| ... } ⇒ Object
:nodoc:
41 42 43 |
# File 'lib/bindata/trace.rb', line 41 def # :nodoc: yield @tracer end |
.trace_reading(io = STDERR) ⇒ Object
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.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bindata/trace.rb', line 6 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 |