Class: Hanami::CLI::RakeTasks
- Inherits:
-
Object
- Object
- Hanami::CLI::RakeTasks
- Includes:
- Rake::DSL
- Defined in:
- lib/hanami/cli/rake_tasks.rb
Overview
Install Rake tasks in an app
Class Method Summary collapse
- .install_tasks ⇒ Object private
- .register_tasks(&blk) ⇒ Object private
- .tasks ⇒ Object private
Instance Method Summary collapse
- #call(tasks) ⇒ Object private
Class Method Details
.install_tasks ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/hanami/cli/rake_tasks.rb', line 40 def self.install_tasks new.call(tasks) end |
.register_tasks(&blk) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 |
# File 'lib/hanami/cli/rake_tasks.rb', line 23 def self.register_tasks(&blk) @_mutex.synchronize do @tasks << blk @tasks.uniq! end end |
.tasks ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 36 |
# File 'lib/hanami/cli/rake_tasks.rb', line 32 def self.tasks @_mutex.synchronize do @tasks end end |
Instance Method Details
#call(tasks) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/hanami/cli/rake_tasks.rb', line 46 def call(tasks) tasks.each(&:call) end |