Class: GOBL::CBC::Definition

Inherits:
Object show all
Defined in:
lib/generated/gobl/cbc/definition.rb

Overview

Definition defines properties of a key, code, or other value that has a specific meaning or utility.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Definition structure

'https://gobl.org/draft-0/cbc/definition'

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#codeGOBL::CBC::Code (readonly)

Code this definition represents.

Returns:



23
# File 'lib/generated/gobl/cbc/definition.rb', line 23

property :code, GOBL::CBC::Code

#descGOBL::I18n::String (readonly)

Description offering more details about when the key should be used.

Returns:



34
# File 'lib/generated/gobl/cbc/definition.rb', line 34

property :desc, GOBL::I18n::String

#keyGOBL::CBC::Key (readonly)

Key being defined.

Returns:



18
# File 'lib/generated/gobl/cbc/definition.rb', line 18

property :key, GOBL::CBC::Key

#mapGOBL::CBC::CodeMap (readonly)

Map helps map local keys to specific codes, useful for converting the described key into a local code.

Returns:



59
# File 'lib/generated/gobl/cbc/definition.rb', line 59

property :map, GOBL::CBC::CodeMap

#metaGOBL::CBC::Meta (readonly)

Meta defines any additional details that may be useful or associated with the key.

Returns:



39
# File 'lib/generated/gobl/cbc/definition.rb', line 39

property :meta, GOBL::CBC::Meta

#nameGOBL::I18n::String (readonly)

Short name for the key.

Returns:



28
# File 'lib/generated/gobl/cbc/definition.rb', line 28

property :name, GOBL::I18n::String

#patternString (readonly)

Pattern is used to validate the key value instead of using a fixed value from the code or key definitions.

Returns:

  • (String)


54
# File 'lib/generated/gobl/cbc/definition.rb', line 54

property :pattern, String

#sourcesArray<GOBL::CBC::Source> (readonly)

Where the information was sourced from.

Returns:



44
# File 'lib/generated/gobl/cbc/definition.rb', line 44

property :sources, [GOBL::CBC::Source]

#valuesArray<GOBL::CBC::Definition> (readonly)

Values defines the possible values associated with the key, which themselves will either be keys or codes depending on the context.

Returns:



49
# File 'lib/generated/gobl/cbc/definition.rb', line 49

property :values, [GOBL::CBC::Definition]