Class: Ruckus::Len

Inherits:
Number show all
Defined in:
lib/ruckus/number.rb

Overview

A length field (specify the width, if it’s not 32 bits little-endian) — its value will be :size of the following field (or provide :offset)

Constant Summary

Constants inherited from Number

Number::BASERX

Constants inherited from Parsel

Parsel::VERBOTEN

Instance Attribute Summary

Attributes inherited from Number

#ascii, #endian, #pad, #radix, #value, #width

Attributes inherited from Parsel

#name, #parent, #rendered_offset, #rendering, #tag, #value

Instance Method Summary collapse

Methods inherited from Number

#ascii_capture, #ascii_to_s, #capture, #odd_width?, #odd_width_capture, #odd_width_first?, #odd_width_to_s, #resolve, #size, #span_bits, #span_offset, #to_s

Methods inherited from Parsel

bytes_for_bits, coerce, #each_matching_selector, endian?, factory?, #find_containing, #find_tag, #find_tag_struct, #fixup, #in, #incomplete!, #index_for_selectors, #inspect, #matches_selector?, #method_missing, #native?, native?, #next, #out, #parent_structure, #permute, #prev, #resolve, #respond_to?, #root, #size, #visit, #where_am_i?

Constructor Details

#initialize(opts = {}) ⇒ Len

Returns a new instance of Len.



351
352
353
# File 'lib/ruckus/number.rb', line 351

def initialize(opts={})
    super(opts.merge(:width => 32, :value => :size))
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ruckus::Parsel