Class: Duty::Plugins::Plugin
- Inherits:
-
Object
- Object
- Duty::Plugins::Plugin
- Defined in:
- lib/duty/plugins.rb
Instance Method Summary collapse
-
#initialize(namespace, entry) ⇒ Plugin
constructor
A new instance of Plugin.
- #load_tasks ⇒ Object
- #namespace ⇒ Object
- #tasks ⇒ Object
Constructor Details
#initialize(namespace, entry) ⇒ Plugin
Returns a new instance of Plugin.
25 26 27 28 29 |
# File 'lib/duty/plugins.rb', line 25 def initialize(namespace, entry) @namespace = namespace @entry = entry @tasks = [] end |
Instance Method Details
#load_tasks ⇒ Object
41 42 43 44 |
# File 'lib/duty/plugins.rb', line 41 def load_tasks require_tasks expose_tasks end |
#namespace ⇒ Object
31 32 33 |
# File 'lib/duty/plugins.rb', line 31 def namespace @namespace end |
#tasks ⇒ Object
35 36 37 38 39 |
# File 'lib/duty/plugins.rb', line 35 def tasks @task_classes.select do |task_class| valid?(task_class) end end |