Skip to content
Browse files

Merge pull request #261 from spadin/master

Readme section for creating new Guard is unclear

[ci skip]
  • Loading branch information...
2 parents c87e739 + a49181b commit 9e3676283fbf9479cf5396232489c66d6683903d Rémy Coutable committed Mar 13, 2012
Showing with 10 additions and 11 deletions.
  1. +10 −11 README.md
View
21 README.md
@@ -760,13 +760,12 @@ You may also need to pay attention to the values of `max_queued_events` and `max
Create a Guard
--------------
-Creating a new Guard is very easy, just create a new gem by running `bundle gem guard-name`, where `name` is
-the name of your Guard. Please make your Guard start with `guard-`, so that it can easily be found on RubyGems.
+Creating a new Guard is very easy. For example, to create a Guard named `yoyo` just create a new gem by running `bundle gem guard-yoyo`. Please make your Guard start with `guard-`, so that it can easily be found on RubyGems.
```bash
-$ mkdir guard-name
-$ cd guard-name
-$ bundle gem guard-name
+$ mkdir guard-yoyo
+$ cd guard-yoyo
+$ bundle gem guard-yoyo
```
Now extend the project structure to have an initial Guard:
@@ -775,31 +774,31 @@ Now extend the project structure to have an initial Guard:
.travis.yml # bonus point!
CHANGELOG.md # bonus point!
Gemfile
-guard-name.gemspec
+guard-yoyo.gemspec
Guardfile
lib/
guard/
- guard-name/
+ yoyo/
templates/
Guardfile # needed for `guard init <guard-name>`
version.rb
- guard-name.rb
+ yoyo.rb
test/ # or spec/
README.md
```
-Your Guard main class `Guard::GuardName` in `lib/guard/guard-name.rb` must inherit from
+Your Guard main class `Guard::Yoyo` in `lib/guard/guard-yoyo.rb` must inherit from
[Guard::Guard](http://rubydoc.info/github/guard/guard/master/Guard/Guard) and should overwrite at least the
`#run_on_change` task methods.
-Here is an example scaffold for `lib/guard/guard-name.rb`:
+Here is an example scaffold for `lib/guard/yoyo.rb`:
```ruby
require 'guard'
require 'guard/guard'
module Guard
- class GuardName < Guard
+ class Yoyo < Guard
# Initialize a Guard.
# @param [Array<Guard::Watcher>] watchers the Guard file watchers

0 comments on commit 9e36762

Please sign in to comment.
Something went wrong with that request. Please try again.