Sha256: 877d8bbe5539c0b3fa7e8f5f3ad3cc31dff6e16b36f64289fedac1a2bd4eee56

Contents?: true

Size: 286 Bytes

Versions: 1

Compression:

Stored size: 286 Bytes

Contents

module Marksman
  module Equality

    def == (other)
      self.class == other.class && self.attributes == other.attributes
    end

    def attributes
      Hash[instance_variables.map do |attribute|
        [attribute, instance_variable_get(attribute)]
      end]
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
marksman-0.1 lib/marksman/equality.rb