Class: AIXM::PayloadHash
Overview
Calculate OFMX-compliant payload hashes.
Defined Under Namespace
Classes: Mid
Constant Summary collapse
- IGNORED_ATTRIBUTES =
%w(mid source).freeze
Instance Method Summary collapse
-
#initialize(fragment) ⇒ PayloadHash
constructor
A new instance of PayloadHash.
-
#to_uuid ⇒ String
UUIDv3.
Constructor Details
#initialize(fragment) ⇒ PayloadHash
Returns a new instance of PayloadHash.
21 22 23 24 25 26 27 |
# File 'lib/aixm/payload_hash.rb', line 21 def initialize(fragment) @fragment = case fragment when Nokogiri::XML::DocumentFragment then fragment when Nokogiri::XML::Element, String then Nokogiri::XML.fragment(fragment) else fail ArgumentError end end |
Instance Method Details
#to_uuid ⇒ String
UUIDv3
32 33 34 |
# File 'lib/aixm/payload_hash.rb', line 32 def to_uuid uuid_for payload_array end |