Sha256: 6378784fd818acc7c047234f561f3f9a395f0230747ab7c27e0588f0ca3f98f7

Contents?: true

Size: 286 Bytes

Versions: 2

Compression:

Stored size: 286 Bytes

Contents

module Opie
  class Failure
    attr_reader :data, :type

    def initialize(type, data = nil)
      @type = type
      @data = data
    end

    def ==(other)
      type == other.type && data == other.data
    end

    def hash
      [type, (data || '').to_sym].hash
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opie-1.1.0 lib/opie/failure.rb
opie-1.0.0 lib/opie/failure.rb