Skip to content

Commit

Permalink
Tweak the API documentation
Browse files Browse the repository at this point in the history
* Be more explicit about what block parameter is obviated by #method_missing
* Use 'recipe' nomenclature in connection with Capistrano
* Use a Rake task from Rails as an example, rather than "foo"
  • Loading branch information
njonsson committed Jan 28, 2012
1 parent a6d8771 commit 92785d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/cape/dsl.rb
Expand Up @@ -74,8 +74,8 @@ def local_rake_executable=(value)
rake.local_executable = value
end

# Makes the use of a block parameter optional by forwarding non-Cape method
# calls to the containing binding.
# Makes the use of a Cape block parameter optional by forwarding non-Cape
# method calls to the containing binding.
#
# @param [Symbol, String] method the method called
# @param [Array] args the arguments passed to _method_
Expand All @@ -85,13 +85,13 @@ def method_missing(method, *args, &block)
@outer_self.send(method, *args, &block)
end

# Defines Rake tasks as Capistrano tasks.
# Defines Rake tasks as Capistrano recipes.
#
# @param [String, Symbol] task_expression the full name of a Rake task or
# namespace to filter; optional
# @return [DSL] the object
#
# @note Any parameters that the Rake tasks have are integrated via environment variables, since Capistrano does not support task parameters per se.
# @note Any parameters that the Rake tasks have are integrated via environment variables, since Capistrano does not support recipe parameters per se.
#
# @example Mirroring all Rake tasks
# # config/deploy.rb
Expand All @@ -102,13 +102,13 @@ def method_missing(method, *args, &block)
# mirror_rake_tasks
# end
#
# @example Mirroring some Rake tasks
# @example Mirroring specific Rake tasks
# # config/deploy.rb
#
# require 'cape'
#
# Cape do
# mirror_rake_tasks :foo
# mirror_rake_tasks 'log:clear'
# end
#
# @example Mirroring Rake tasks into a Capistrano namespace
Expand Down

0 comments on commit 92785d6

Please sign in to comment.