Module: GOBLExtensions::DocumentHelper::ClassMethods
- Included in:
- GOBL::Document
- Defined in:
- lib/gobl_extensions/document_helper.rb
Instance Method Summary collapse
-
#embed(struct) ⇒ Document
Embeds the given GOBL struct in a new document injecting the proper Schema ID.
Instance Method Details
#embed(struct) ⇒ Document
Embeds the given GOBL struct in a new document injecting the proper Schema ID.
38 39 40 41 42 |
# File 'lib/gobl_extensions/document_helper.rb', line 38 def (struct) new struct.as_json.merge( '$schema' => struct.class::SCHEMA_ID ) end |