module SalaryCalc::Conversions::FromHourly
Public Instance Methods
to_daily()
click to toggle source
# File lib/salary_calc/conversions/from_hourly.rb, line 23 def to_daily rounded(billable_hours * amount.to_f) end
to_monthly()
click to toggle source
Does not calculate monthly salary based on a 4 week month. Some people define a month as 4 weeks. Use {#to_monthly_alternate} for a version using this assumption. This might be removed in the future.
# File lib/salary_calc/conversions/from_hourly.rb, line 11 def to_monthly rounded(amount.to_f * (billable_hours * 5) * 52 / 12) end
to_monthly_alternate()
click to toggle source
# File lib/salary_calc/conversions/from_hourly.rb, line 15 def to_monthly_alternate rounded(to_weekly * 4) end
to_weekly()
click to toggle source
# File lib/salary_calc/conversions/from_hourly.rb, line 19 def to_weekly rounded(to_daily * 5.0) end
to_yearly()
click to toggle source
# File lib/salary_calc/conversions/from_hourly.rb, line 3 def to_yearly rounded(to_weekly * 52) end