<commit_before>class Price
  
  include Comparable
  
  @@tax_rate = 175
  cattr_accessor :tax_rate
  
  attr_accessor :money
  
  attr_accessor :currency
  
  attr_accessor :taxable
  
  def initialize(cents, currency, taxable = true, tax_inclusive = false)
    @currency = currency
    @taxable  = taxable
    
    raise "If something isn't taxable, you shouldn't be passing a tax inclusive price to it!" if taxable == false && tax_inclusive == true

    if tax_inclusive == true
      @money = Money.new((cents.to_f / (1000 + @@tax_rate) * 1000), self.currency)
    else
      @money = Money.new(cents, self.currency)
    end
  end
  
  def tax
    if self.taxable == true
      Money.new((self.money.cents.to_f / 1000 * @@tax_rate), self.currency)
    else
      Money.new(0, self.currency)
    end
  end
  
  def tax_rate
    @@tax_rate.to_f / 10
  end
  
  def with_tax
    self.money + self.tax
  end
  
  def without_tax
    self.money
  end
  
end<commit_msg>Added alias of taxable? to taxable.<commit_after>class Price
  
  include Comparable
  
  @@tax_rate = 175
  cattr_accessor :tax_rate
  
  attr_accessor :money
  
  attr_accessor :currency
  
  attr_accessor :taxable
  
  def initialize(cents, currency, taxable = true, tax_inclusive = false)
    @currency = currency
    @taxable  = taxable
    
    raise "If something isn't taxable, you shouldn't be passing a tax inclusive price to it!" if taxable == false && tax_inclusive == true

    if tax_inclusive == true
      @money = Money.new((cents.to_f / (1000 + @@tax_rate) * 1000), self.currency)
    else
      @money = Money.new(cents, self.currency)
    end
  end
  
  def tax
    if self.taxable == true
      Money.new((self.money.cents.to_f / 1000 * @@tax_rate), self.currency)
    else
      Money.new(0, self.currency)
    end
  end
  
  def tax_rate
    @@tax_rate.to_f / 10
  end
  
  def with_tax
    self.money + self.tax
  end
  
  def without_tax
    self.money
  end
  
  alias :taxable? :taxable
  
end
{'fraction_non_alphanumeric': 0.0920523138832998, 'fraction_numerical': 0.018108651911468814, 'mean_word_length': 2.570915619389587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1114857', 'n_tokens_mistral': 753, 'n_tokens_neox': 676, 'n_words': 185}