Created
October 16, 2014 04:02
-
-
Save 1syo/0cdd4ec6e21c8c85a8e4 to your computer and use it in GitHub Desktop.
This file contains 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
require 'bundler/setup' | |
Bundler.require | |
class Price | |
attr_reader :including_tax | |
def initialize(including_tax) | |
@including_tax = including_tax | |
end | |
def tax | |
including_tax - excluding_tax | |
end | |
def excluding_tax | |
(including_tax / 1.08).round | |
end | |
end | |
binding.pry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment