Module: CMF
- Defined in:
- lib/cmf.rb,
lib/cmf/type.rb,
lib/cmf/parser.rb,
lib/cmf/varint.rb,
lib/cmf/builder.rb,
lib/cmf/version.rb,
lib/cmf/dictionary.rb,
lib/cmf/malformed_message_error.rb
Overview
The top-level module for the cmf gem.
Defined Under Namespace
Modules: Dictionary, Type Classes: Builder, MalformedMessageError, Parser, Varint
Constant Summary collapse
- VERSION =
This gem's version.
'1.0.1'
Class Method Summary collapse
-
.build(obj, dictionary = nil) ⇒ String
An octet string, each character representing one byte of the CMF message.
-
.build_hex(obj, dictionary = nil) ⇒ String
Builds hex-encoded a CMF message from an object.
-
.parse(message, dictionary = nil) ⇒ Hash
Parses a CMF message into an object.
-
.parse_hex(message_hex, dictionary = nil) ⇒ Hash
Parses a hex-encoded CMF message into an object.
Class Method Details
.build(obj, dictionary = nil) ⇒ String
Returns An octet string, each character representing one byte of the CMF message.
20 21 22 |
# File 'lib/cmf.rb', line 20 def self.build(obj, dictionary = nil) Builder.new(dictionary).build(obj).to_octet end |
.build_hex(obj, dictionary = nil) ⇒ String
Builds hex-encoded a CMF message from an object.
29 30 31 |
# File 'lib/cmf.rb', line 29 def self.build_hex(obj, dictionary = nil) Builder.new(dictionary).build(obj).to_hex end |