Module: Indis::BinaryFormat

Defined in:
lib/indis-core/binary_format.rb

Overview

BinaryFormat manages a set of known binary formats and provides support for guessing the correct format for target binary.

Defined Under Namespace

Classes: Format

Class Method Summary collapse

Class Method Details

.known_formatsArray<Class>

Returns a list of all known binary formats.

Returns:

  • (Array<Class>)

    all known binary formats.



28
29
30
31
32
33
34
35
# File 'lib/indis-core/binary_format.rb', line 28

def self.known_formats
  fmt = []
  self.constants.each do |c|
    e = const_get(c)
    fmt << e if e.is_a?(Class) && e.superclass == Format
  end
  fmt
end