Class: X12::Table

Inherits:
Hash
  • Object
show all
Defined in:
lib/x12/table.rb

Overview

This just a named hash to store validation tables.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, name_values) ⇒ void

Create a new table with given name and hash content.



10
11
12
13
# File 'lib/x12/table.rb', line 10

def initialize(name, name_values)
  @name = name
  self.merge!(name_values)
end

Instance Attribute Details

#nameString (readonly)

Returns:

  • (String)


6
7
8
# File 'lib/x12/table.rb', line 6

def name
  @name
end

Instance Method Details

#inspectString

Return a printable string representing this table

Returns:

  • (String)


17
18
19
# File 'lib/x12/table.rb', line 17

def inspect
  "Table #{name} -- #{super.inspect}"
end