Class: TaxJp::HealthInsurance
- Inherits:
-
Object
- Object
- TaxJp::HealthInsurance
- Defined in:
- lib/tax_jp/health_insurance.rb
Overview
健康年金
Instance Attribute Summary collapse
-
#basic ⇒ Object
readonly
Returns the value of attribute basic.
-
#general ⇒ Object
readonly
Returns the value of attribute general.
-
#monthly_standard ⇒ Object
readonly
Returns the value of attribute monthly_standard.
-
#particular ⇒ Object
readonly
Returns the value of attribute particular.
-
#prefecture ⇒ Object
readonly
Returns the value of attribute prefecture.
-
#valid_from ⇒ Object
readonly
Returns the value of attribute valid_from.
-
#valid_until ⇒ Object
readonly
Returns the value of attribute valid_until.
Instance Method Summary collapse
- #general_amount ⇒ Object
- #general_amount_care ⇒ Object
- #general_amount_care_half ⇒ Object
- #general_amount_half ⇒ Object
-
#initialize(attrs = {}) ⇒ HealthInsurance
constructor
A new instance of HealthInsurance.
Constructor Details
#initialize(attrs = {}) ⇒ HealthInsurance
Returns a new instance of HealthInsurance.
10 11 12 13 14 15 16 17 18 |
# File 'lib/tax_jp/health_insurance.rb', line 10 def initialize(attrs = {}) @valid_from = attrs[:valid_from] @valid_until = attrs[:valid_until] @monthly_standard = attrs[:monthly_standard] @prefecture = attrs[:prefecture] @general= attrs[:general] @particular= attrs[:particular] @basic = attrs[:basic] end |
Instance Attribute Details
#basic ⇒ Object (readonly)
Returns the value of attribute basic.
8 9 10 |
# File 'lib/tax_jp/health_insurance.rb', line 8 def basic @basic end |
#general ⇒ Object (readonly)
Returns the value of attribute general.
8 9 10 |
# File 'lib/tax_jp/health_insurance.rb', line 8 def general @general end |
#monthly_standard ⇒ Object (readonly)
Returns the value of attribute monthly_standard.
6 7 8 |
# File 'lib/tax_jp/health_insurance.rb', line 6 def monthly_standard @monthly_standard end |
#particular ⇒ Object (readonly)
Returns the value of attribute particular.
8 9 10 |
# File 'lib/tax_jp/health_insurance.rb', line 8 def particular @particular end |
#prefecture ⇒ Object (readonly)
Returns the value of attribute prefecture.
7 8 9 |
# File 'lib/tax_jp/health_insurance.rb', line 7 def prefecture @prefecture end |
#valid_from ⇒ Object (readonly)
Returns the value of attribute valid_from.
5 6 7 |
# File 'lib/tax_jp/health_insurance.rb', line 5 def valid_from @valid_from end |
#valid_until ⇒ Object (readonly)
Returns the value of attribute valid_until.
5 6 7 |
# File 'lib/tax_jp/health_insurance.rb', line 5 def valid_until @valid_until end |
Instance Method Details
#general_amount ⇒ Object
20 21 22 |
# File 'lib/tax_jp/health_insurance.rb', line 20 def general_amount floor_amount(monthly_standard * general) end |
#general_amount_care ⇒ Object
28 29 30 |
# File 'lib/tax_jp/health_insurance.rb', line 28 def general_amount_care floor_amount(monthly_standard * (general + 0.0158)) end |
#general_amount_care_half ⇒ Object
32 33 34 |
# File 'lib/tax_jp/health_insurance.rb', line 32 def general_amount_care_half floor_amount(monthly_standard * (general + 0.0158) / 2) end |
#general_amount_half ⇒ Object
24 25 26 |
# File 'lib/tax_jp/health_insurance.rb', line 24 def general_amount_half floor_amount(monthly_standard * general / 2) end |