This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To run: | |
| # gem install rspec | |
| # rspec mb.rb | |
| class Pocket | |
| attr_reader :white, :red, :blue, :black, :green | |
| InvalidValueForColor = Class.new(StandardError) | |
| def initialize(white: 0, red: 0, blue: 0, black: 0, green: 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mes = 2; | |
| isValidMonth = true; | |
| if(mes < 1){ | |
| console.log('mes tem que ser maior que 1'); | |
| isValidMonth = false; | |
| } | |
| if(mes > 12){ |
OlderNewer