Module: SleepingKingStudios::Tasks::Task::ClassMethods
- Included in:
- SleepingKingStudios::Tasks::Task
- Defined in:
- lib/sleeping_king_studios/tasks/task.rb
Overview
rubocop:disable Style/Documentation
Instance Method Summary collapse
-
#description ⇒ String
The description of the task.
-
#option(option_name, option_params) ⇒ Object
Defines a permitted option for the task.
-
#options ⇒ Hash
The permitted options for the task.
-
#task_name ⇒ String
The name of the task.
Instance Method Details
#description ⇒ String
Returns The description of the task.
14 15 16 |
# File 'lib/sleeping_king_studios/tasks/task.rb', line 14 def description 'A non-descript task if ever there was one.' end |
#option(option_name, option_params) ⇒ Object
Defines a permitted option for the task.
24 25 26 27 28 |
# File 'lib/sleeping_king_studios/tasks/task.rb', line 24 def option option_name, option_params [option_name] = option_params define_helpers option_name, option_params end |
#options ⇒ Hash
Returns The permitted options for the task.
31 32 33 |
# File 'lib/sleeping_king_studios/tasks/task.rb', line 31 def @options ||= {} end |
#task_name ⇒ String
Returns The name of the task.
36 37 38 39 40 |
# File 'lib/sleeping_king_studios/tasks/task.rb', line 36 def task_name tools = SleepingKingStudios::Tools::Toolbelt.instance tools.str.underscore(name.split('::').last).sub(/_task$/, '') end |