Created
July 15, 2019 13:53
-
-
Save BernardoMG/270ebd20097ca0a78ef7a7c915542a9f to your computer and use it in GitHub Desktop.
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
class Converter | |
def self.to_binary(number) | |
number.to_s(2) | |
end | |
def self.to_number(binary_number) | |
binary_number.to_i(2) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment