Sha256: 581123db1d429a455ce6049ba389d9411ec6990076cf3290ec9aad17f1e0d376

Contents?: true

Size: 220 Bytes

Versions: 1

Compression:

Stored size: 220 Bytes

Contents

require 'hashed_struct/version'

class HashedStruct

  def self.new(*fields)
    Struct.new(*fields) do
      def initialize(options={})
        super(*options.values_at(*self.class.members))
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hashed_struct-0.0.2 lib/hashed_struct.rb