Class: EngineeringCalculator::Calculator
- Inherits:
-
Object
- Object
- EngineeringCalculator::Calculator
- Defined in:
- lib/engineering_calculator/calculator.rb
Constant Summary collapse
- @@current_calculator =
nil
Class Method Summary collapse
- .calculator_list ⇒ Object
- .function(fun) ⇒ Object
- .functions ⇒ Object
- .use_calculator(calculator_number) ⇒ Object
Instance Method Summary collapse
Class Method Details
.calculator_list ⇒ Object
25 26 27 |
# File 'lib/engineering_calculator/calculator.rb', line 25 def self.calculator_list make_calculator_list end |
.function(fun) ⇒ Object
37 38 39 |
# File 'lib/engineering_calculator/calculator.rb', line 37 def self.function(fun) perform(fun) end |
.functions ⇒ Object
33 34 35 |
# File 'lib/engineering_calculator/calculator.rb', line 33 def self.functions list_functions end |
.use_calculator(calculator_number) ⇒ Object
29 30 31 |
# File 'lib/engineering_calculator/calculator.rb', line 29 def self.use_calculator(calculator_number) set_calculator(calculator_number) end |
Instance Method Details
#launch ⇒ Object
12 13 14 15 |
# File 'lib/engineering_calculator/calculator.rb', line 12 def launch OutputManager.display_welcome main_loop end |
#main_loop ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/engineering_calculator/calculator.rb', line 17 def main_loop response = nil OutputManager.display_actions while response != :quit response = prompt_user end end |