Sha256: 65158e9c24770fca1433b1910dddc652667222f93fa92968a7b82367d0ec90fa

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

module X12

  # This just a named hash to store validation tables.
  class Table < Hash
    attr_reader :name

    # Create a new table with given name and hash content.
    def initialize(name, name_values)
      @name = name
      self.merge!(name_values)
    end

    # Return a printable string representing this table
    # @return [String]
    def inspect
      "Table #{name} -- #{super.inspect}"
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tcd_x12-1.6.2 lib/x12/table.rb
tcd_x12-1.6.1 lib/x12/table.rb
tcd_x12-1.6.0 lib/x12/table.rb