Module: Menu
- Defined in:
- lib/menu/worktime/intervaltime_menu.rb,
lib/menu/menu.rb,
lib/menu/base_menu.rb,
lib/menu/main_menu.rb,
lib/menu/adapter_menu.rb,
lib/menu/person_option.rb,
lib/menu/entity_queries.rb,
lib/menu/database_option.rb,
lib/menu/entity_addition.rb,
lib/menu/worktime/time_menu.rb,
lib/menu/worktime/weektime_menu.rb,
lib/menu/worktime/monthtime_menu.rb,
lib/menu/worktime/customtime_menu.rb,
lib/menu/worktime/worktime_queries.rb
Overview
This module holds the classes for the terminal menu, which can be used to run this program in a terminal window.
Defined Under Namespace
Modules: TimeMenu Classes: AdapterMenu, Base, DatabaseOption, EntityAddition, EntityQueries, MainMenu, PersonOption, WorktimeQueries
Class Attribute Summary collapse
-
.data_handler ⇒ BaseHandler
readonly
The handler for the data storage.
Class Method Summary collapse
-
.exit_script ⇒ Object
method to end the script without saving any data.
-
.initialize_datahandler(data_handler) ⇒ Object
method to set a new data handler.
-
.parse_date(string) ⇒ Time
method to parse a date from a given string.
Class Attribute Details
.data_handler ⇒ BaseHandler (readonly)
Returns the handler for the data storage.
10 11 12 |
# File 'lib/menu/menu.rb', line 10 def data_handler @data_handler end |
Class Method Details
.exit_script ⇒ Object
method to end the script without saving any data
20 21 22 23 |
# File 'lib/menu/menu.rb', line 20 def self.exit_script puts "Shutting down...".yellow exit(0) end |
.initialize_datahandler(data_handler) ⇒ Object
method to set a new data handler
15 16 17 |
# File 'lib/menu/menu.rb', line 15 def self.initialize_datahandler(data_handler) @data_handler = data_handler end |