Class: SalaryCalc::Calculator
- Inherits:
-
Object
- Object
- SalaryCalc::Calculator
- Defined in:
- lib/salary_calc.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#billable_hours ⇒ Object
Returns the value of attribute billable_hours.
Instance Method Summary collapse
-
#initialize(amount, billable_hours = 8) ⇒ Calculator
constructor
A new instance of Calculator.
- #to_hourly ⇒ Object
Methods included from SalaryCalc::Conversions::ToHourly
#from_daily, #from_monthly, #from_weekly, #from_yearly
Methods included from SalaryCalc::Conversions::FromHourly
#to_daily, #to_monthly, #to_weekly, #to_yearly
Constructor Details
#initialize(amount, billable_hours = 8) ⇒ Calculator
Returns a new instance of Calculator.
11 12 13 14 |
# File 'lib/salary_calc.rb', line 11 def initialize(amount, billable_hours = 8) @amount = amount @billable_hours = billable_hours end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
9 10 11 |
# File 'lib/salary_calc.rb', line 9 def amount @amount end |
#billable_hours ⇒ Object
Returns the value of attribute billable_hours.
9 10 11 |
# File 'lib/salary_calc.rb', line 9 def billable_hours @billable_hours end |
Instance Method Details
#to_hourly ⇒ Object
16 17 18 |
# File 'lib/salary_calc.rb', line 16 def to_hourly amount end |