class TaxManipulator::Rate
Attributes
ending[RW]
rate[RW]
starting[RW]
Public Class Methods
new(params)
click to toggle source
# File lib/tax_manipulator/rate.rb, line 5 def initialize(params) params.each { |key, value| send "#{key}=", value } end
Public Instance Methods
match?(date)
click to toggle source
# File lib/tax_manipulator/rate.rb, line 9 def match?(date) return true if starting.nil? && ending.nil? return date <= ending if starting.nil? return date >= starting if ending.nil? date <= ending && date >= starting end