Class: X12::Table

Inherits:
Hash
  • Object
show all
Defined in:
lib/X12/Table.rb

Overview

$Id: Table.rb 35 2008-11-13 18:33:44Z ikk $

This just a named hash to store validation tables.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, name_values) ⇒ Table

Create a new table with given name and hash content.



34
35
36
37
# File 'lib/X12/Table.rb', line 34

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



31
32
33
# File 'lib/X12/Table.rb', line 31

def name
  @name
end

Instance Method Details

#inspectObject

Return a printable string representing this table



40
41
42
# File 'lib/X12/Table.rb', line 40

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