module SalaryCalc::Conversions::ToHourly

Public Instance Methods

from_daily(daily) click to toggle source
# File lib/salary_calc/conversions/to_hourly.rb, line 15
def from_daily(daily)
  rounded(daily.to_f / billable_hours)
end
from_monthly(monthly) click to toggle source
# File lib/salary_calc/conversions/to_hourly.rb, line 7
def from_monthly(monthly)
  rounded(monthly.to_f * 12 / 52 / (billable_hours * 5))
end
from_weekly(weekly) click to toggle source
# File lib/salary_calc/conversions/to_hourly.rb, line 11
def from_weekly(weekly)
  rounded(weekly.to_f / (billable_hours * 5))
end
from_yearly(yearly) click to toggle source
# File lib/salary_calc/conversions/to_hourly.rb, line 3
def from_yearly(yearly)
  rounded(yearly.to_f / 52 / (billable_hours * 5))
end