Sha256: c10a86d8032012f1dbb1052bdd35b21b22f5881623bba78af0c8a4a4152c7ffd

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

module X12

  # This just a named hash to store validation tables.
  class Table < Hash
    # @return [String]
    attr_reader :name

    # Create a new table with given name and hash content.
    # @return [void]
    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.7.1 lib/x12/table.rb
tcd_x12-1.7.0 lib/x12/table.rb
tcd_x12-1.6.3 lib/x12/table.rb