Class: TaxJp::SocialInsurances::HealthInsurance

Inherits:
Object
  • Object
show all
Defined in:
lib/tax_jp/social_insurances/health_insurance.rb

Overview

健康年金

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ HealthInsurance

Returns a new instance of HealthInsurance.



9
10
11
12
13
14
15
16
17
18
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 9

def initialize(attrs = {})
  @grade = attrs[:grade]
  @valid_from = attrs[:valid_from]
  @valid_until = attrs[:valid_until]
  @prefecture = attrs[:prefecture]
  @general= attrs[:general]
  @care = attrs[:care]
  @particular= attrs[:particular]
  @basic = attrs[:basic]
end

Instance Attribute Details

#basicObject (readonly)

Returns the value of attribute basic.



7
8
9
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 7

def basic
  @basic
end

#careObject (readonly)

Returns the value of attribute care.



6
7
8
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 6

def care
  @care
end

#generalObject (readonly)

Returns the value of attribute general.



6
7
8
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 6

def general
  @general
end

#gradeObject (readonly)

Returns the value of attribute grade.



3
4
5
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 3

def grade
  @grade
end

#particularObject (readonly)

Returns the value of attribute particular.



7
8
9
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 7

def particular
  @particular
end

#prefectureObject (readonly)

Returns the value of attribute prefecture.



5
6
7
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 5

def prefecture
  @prefecture
end

#valid_fromObject (readonly)

Returns the value of attribute valid_from.



4
5
6
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 4

def valid_from
  @valid_from
end

#valid_untilObject (readonly)

Returns the value of attribute valid_until.



4
5
6
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 4

def valid_until
  @valid_until
end

Instance Method Details

#general_amountObject



20
21
22
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 20

def general_amount
  floor_amount(monthly_standard * general) 
end

#general_amount_careObject



28
29
30
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 28

def general_amount_care
  floor_amount(monthly_standard * (general + care)) 
end

#general_amount_care_halfObject



32
33
34
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 32

def general_amount_care_half
  floor_amount(monthly_standard * (general + care) / 2) 
end

#general_amount_halfObject



24
25
26
# File 'lib/tax_jp/social_insurances/health_insurance.rb', line 24

def general_amount_half
  floor_amount(monthly_standard * general / 2) 
end