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.
29 30 31 32 33 |
# File 'lib/duty/plugins.rb', line 29 def initialize(namespace, entry) @namespace = namespace @entry = entry @tasks = [] end |
Instance Method Details
#load_tasks ⇒ Object
45 46 47 48 |
# File 'lib/duty/plugins.rb', line 45 def load_tasks require_tasks expose_tasks end |
#namespace ⇒ Object
35 36 37 |
# File 'lib/duty/plugins.rb', line 35 def namespace @namespace end |
#tasks ⇒ Object
39 40 41 42 43 |
# File 'lib/duty/plugins.rb', line 39 def tasks @task_classes.select do |task_class| valid?(task_class) end end |