Skip to content

Conversation

dommichalec
Copy link

No description provided.

end

def thieves=(number)
fail TypeError, 'Input must be an integer' unless number.is_a? Integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the Integer method: http://ruby-doc.org/core-2.0.0/Kernel.html#method-i-Integer

Integer(42) #=> 42
Integer(:foo)
#=> TypeError: can't convert Symbol into Integer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants