Module: GOBL::Extensions::EnvelopeHelper

Included in:
GOBL::Envelope
Defined in:
lib/gobl/extensions/envelope_helper.rb

Overview

Additional methods for the generated GOBL::Envelope class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



7
8
9
10
# File 'lib/gobl/extensions/envelope_helper.rb', line 7

def self.included(klass)
  klass.alias_method :schema, '$schema'
  klass.alias_method :schema=, '$schema='
end

Instance Method Details

#extractGOBL::Struct

Extracts the GOBL struct embedded in the envelope’s document

Returns:

  • (GOBL::Struct)

    the GOBL struct embedded in the envelope’s document

See Also:



17
18
19
# File 'lib/gobl/extensions/envelope_helper.rb', line 17

def extract
  doc.extract
end

#signed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/gobl/extensions/envelope_helper.rb', line 21

def signed?
  sigs.present?
end