Sha256: 10f41d4fa2e1bd10b6e00eba715ef9fc4c2e31c491222807f1c490c1e13ea846

Contents?: true

Size: 244 Bytes

Versions: 2

Compression:

Stored size: 244 Bytes

Contents

module CardsLib
  class Card
    def initialize(face)
      raise InvalidCardFace, "face cannot be blank" if face.to_s.empty?
      @face = face
    end

    def face
      @face   
    end
  end

  class InvalidCardFace < Exception

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cards_lib-0.0.4 lib/cards_lib/card.rb
cards_lib-0.0.3 lib/cards_lib/card.rb