Sha256: 44305ab2bd71a98a8731b9e7cdcc26f45fd854d0c6be21c76230cc9082b17c26

Contents?: true

Size: 351 Bytes

Versions: 2

Compression:

Stored size: 351 Bytes

Contents

module SplendorGame
  
  class ColouredObject
    private
    # format any inputted colours to the downcase symbol version
    # return false if an invalid input is passed in
    def validate_colour(input)
      if VALID_COLOUR_LIST.include?(input.to_s.upcase)
        input.downcase.to_sym
      else 
        false
      end
    end
    
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
splendor_game-0.1.1 lib/splendor_game/coloured_object.rb
splendor_game-0.1.0 lib/splendor_game/coloured_object.rb