Class: IncomeTax::Countries::UnitedStates::State

Inherits:
Models::Progressive show all
Defined in:
lib/income_tax/countries/united_states/state.rb

Instance Attribute Summary

Attributes inherited from Models::Generic

#gross_income, #net_income, #options, #rate, #taxes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Models::Progressive

#calculate_gross, #calculate_net, level, levels, #levels, offset, remainder, tax_year, tax_years

Methods inherited from Models::Generic

#based_on?, #cast_value, #cast_values, currency, #initialize, #inspect, lazy, #location_name, method_added, name, names, new, other_names, register, register_on, #set_default_options, #setup, #validate, wants_options

Constructor Details

This class inherits a constructor from IncomeTax::Models::Generic

Class Method Details

.deduct_federalObject



8
9
10
# File 'lib/income_tax/countries/united_states/state.rb', line 8

def self.deduct_federal
  @deduct_federal = true
end

.deduct_federal?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/income_tax/countries/united_states/state.rb', line 12

def self.deduct_federal?
  @deduct_federal ||= false
end

.flat_rate(rate) ⇒ Object



20
21
22
# File 'lib/income_tax/countries/united_states/state.rb', line 20

def self.flat_rate(rate)
  remainder rate
end

.no_taxObject



16
17
18
# File 'lib/income_tax/countries/united_states/state.rb', line 16

def self.no_tax
  flat_rate "0%"
end

Instance Method Details

#level_categoryObject



24
25
26
27
28
29
30
# File 'lib/income_tax/countries/united_states/state.rb', line 24

def level_category
  if self.class.levels.include? :default
    :default
  else
    married? ? :couple : :single
  end
end