Browse files

Merge pull request #7 from dhl/patch-1

Proper formatting of code example in the Namespacing Tasks section.
  • Loading branch information...
2 parents 7b14d45 + 1a239ea commit 79b875185e1d358745118e7087c70b05bbf7ce98 @leehambley committed Aug 2, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 index.markdown
View
16 index.markdown
@@ -120,17 +120,17 @@ It stands to reason that with such a wide scope of available uses, there would b
Defining a task in this way, and more about how the task blocks are arranged is forthcoming; however imagine we had two tasks `backup` perhaps, that needed to work differently on different roles.. here's how namepsaces solve that problem
- namespace :web_server do
- task :backup do
- puts "In Example Backup Web-Server"
+ namespace :web_server do
+ task :backup do
+ puts "In Example Backup Web-Server"
+ end
end
- end
- namespace :database_server do
- task :backup do
- puts "In Example Backup Database-Server"
+ namespace :database_server do
+ task :backup do
+ puts "In Example Backup Database-Server"
+ end
end
- end
Whilst the tasks in the first example might be listed by `cap -T` as:

0 comments on commit 79b8751

Please sign in to comment.