Module: BinStruct

Defined in:
lib/bin_struct.rb,
lib/bin_struct/int.rb,
lib/bin_struct/oui.rb,
lib/bin_struct/enum.rb,
lib/bin_struct/array.rb,
lib/bin_struct/string.rb,
lib/bin_struct/struct.rb,
lib/bin_struct/cstring.rb,
lib/bin_struct/version.rb,
lib/bin_struct/bit_attr.rb,
lib/bin_struct/int_string.rb,
lib/bin_struct/structable.rb,
lib/bin_struct/length_from.rb,
lib/bin_struct/abstract_tlv.rb

Overview

This file is part of BinStruct See github.com/lemontree55/bin_struct for more informations Copyright © 2016 Sylvain Daubert <[email protected]> Copyright © 2024 LemonTree55 <[email protected]> This program is published under MIT license.

Defined Under Namespace

Modules: ArrayOfIntMixin, LengthFrom, Structable Classes: AbstractTLV, Array, ArrayOfInt16, ArrayOfInt16le, ArrayOfInt32, ArrayOfInt32le, ArrayOfInt8, BitAttr, CString, Enum, Error, Int, Int16, Int16Enum, Int16be, Int16beEnum, Int16le, Int16leEnum, Int16n, Int24, Int24be, Int24le, Int24n, Int32, Int32Enum, Int32be, Int32beEnum, Int32le, Int32leEnum, Int32n, Int64, Int64be, Int64le, Int64n, Int8, Int8Enum, IntString, OUI, SInt16, SInt16be, SInt16le, SInt16n, SInt32, SInt32be, SInt32le, SInt32n, SInt64, SInt64be, SInt64le, SInt64n, SInt8, String, Struct

Constant Summary collapse

VERSION =

BinStruct version

'0.5.1'

Class Method Summary collapse

Class Method Details

.force_binary(str) ⇒ String

Deprecated.

Use String#b instead of this method

Force binary encoding for str

Parameters:

Returns:

  • (String)

    binary encoded string



45
46
47
# File 'lib/bin_struct.rb', line 45

def self.force_binary(str)
  str.b
end