Sha256: fcc91d2257b7435c01462fd4d2f7da054faed8cb265b0a4907eb1a89b64f6f7b

Contents?: true

Size: 363 Bytes

Versions: 5

Compression:

Stored size: 363 Bytes

Contents

# frozen_string_literal: true

module FiftyTwo
  class Suit
    class Color
      attr_reader :name, :rgb

      def initialize(name, rgb)
        @name = name
        @rgb = rgb
      end

      ALL = [
        RED = new("red", "ff0000"),
        BLACK = new("black", "000000")
      ]

      def ==(other)
        name == other.name
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fiftytwo-0.0.5 lib/fiftytwo/suit/color.rb
fiftytwo-0.0.4 lib/fiftytwo/suit/color.rb
fiftytwo-0.0.3 lib/fiftytwo/suit/color.rb
fiftytwo-0.0.2 lib/fiftytwo/suit/color.rb
fiftytwo-0.0.1 lib/fiftytwo/suit/color.rb