Class: Ibex::ErrorMessages::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/error_messages.rb,
sig/ibex/error_messages.rbs

Overview

Immutable parsed messages document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entries:, version: 2) ⇒ Document

Returns a new instance of Document.

RBS:

  • (entries: Array[Entry], ?version: Integer) -> void

Parameters:

  • entries: (Array[Entry])
  • version: (Integer) (defaults to: 2)


43
44
45
46
47
# File 'lib/ibex/error_messages.rb', line 43

def initialize(entries:, version: 2)
  @version = version
  @entries = entries.freeze
  freeze
end

Instance Attribute Details

#entriesArray[Entry] (readonly)

Signature:

  • Array[Entry]

Returns:



40
41
42
# File 'lib/ibex/error_messages.rb', line 40

def entries
  @entries
end

#versionInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


39
40
41
# File 'lib/ibex/error_messages.rb', line 39

def version
  @version
end