Skip to content

Instantly share code, notes, and snippets.

@1syo
Created October 16, 2014 04:02
Show Gist options
  • Save 1syo/0cdd4ec6e21c8c85a8e4 to your computer and use it in GitHub Desktop.
Save 1syo/0cdd4ec6e21c8c85a8e4 to your computer and use it in GitHub Desktop.
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