Sha256: d7a7836dd0f6141b406b139f67d6b12e9e85e6819c1fbeee66ffefe063312048
Contents?: true
Size: 972 Bytes
Versions: 11
Compression:
Stored size: 972 Bytes
Contents
# 健康保健 class TaxJp::SocialInsurances::HealthInsurance attr_reader :grade attr_reader :valid_from, :valid_until attr_reader :prefecture attr_reader :general, :care attr_reader :particular, :basic 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 def general_amount (monthly_standard * general).round(1) end def general_amount_half floor_amount(general_amount / 2) end def general_amount_care (monthly_standard * (general + care)).round(1) end def general_amount_care_half floor_amount(general_amount_care / 2) end private def monthly_standard grade.grade > 0 ? grade.monthly_standard : 0 end def floor_amount(amount) (amount * 10).floor * 0.1 end end
Version data entries
11 entries across 11 versions & 1 rubygems