-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate all examples with a single rake command (#23)
Co-authored-by: Stanislav (Stas) Katkov <github@skatkov.com>
- Loading branch information
Showing
12 changed files
with
163 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
--load ./lib/yard-markdown.rb | ||
--format markdown | ||
--markup markdown | ||
--output-dir example | ||
--private | ||
--protected | ||
- | ||
example.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Class: Bird | ||
**Inherits:** Object | ||
|
||
|
||
The base class for all birds. | ||
|
||
|
||
|
||
#Instance Methods | ||
## _fly_impl(_direction, _velocity) [](#method-i-_fly_impl) | ||
:nodoc: | ||
|
||
## fly(direction, velocity) [](#method-i-fly) | ||
Fly somewhere. | ||
|
||
Flying is the most critical feature of birds. | ||
|
||
:args: direction, velocity | ||
|
||
:call-seq: | ||
Bird.fly(symbol, number) -> bool | ||
Bird.fly(string, number) -> bool | ||
|
||
# Example | ||
|
||
fly(:south, 70) | ||
|
||
## speak() [](#method-i-speak) | ||
Produce some noise. -- FIXME: maybe extract this to a base class `Animal`? ++ | ||
|
||
**@yield** ["tweet"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Class: Duck | ||
**Inherits:** Object | ||
|
||
**Extended by:** Animal | ||
|
||
**Includes:** Waterfowl | ||
|
||
|
||
A duck is a Waterfowl Bird. | ||
|
||
Features: | ||
|
||
bird:: | ||
|
||
* speak | ||
* fly | ||
|
||
waterfowl:: | ||
|
||
* swim | ||
|
||
|
||
# Class Methods | ||
## rubber_ducks() [](#method-c-rubber_ducks) | ||
**@return** [Array<Duck>] list of all rubber ducks | ||
|
||
# Attributes | ||
## domestic[RW] [](#attribute-i-domestic) | ||
True for domestic ducks. | ||
|
||
## rubber[RW] [](#attribute-i-rubber) | ||
True for rubber ducks. | ||
|
||
|
||
#Instance Methods | ||
## initialize(domestic, rubber) [](#method-i-initialize) | ||
Creates a new duck. | ||
|
||
**@param** [Boolean] | ||
|
||
**@param** [Boolean] | ||
|
||
**@return** [Duck] a new instance of Duck | ||
|
||
## speak() [](#method-i-speak) | ||
Duck overrides generic implementation. | ||
|
||
**@yield** [speech] | ||
|
||
## swim() [](#method-i-swim) | ||
Swimming helper. | ||
|
||
## useful?() [](#method-i-useful?) | ||
Checks if this duck is a useful one. | ||
|
||
:call-seq: | ||
Bird.useful? -> bool | ||
|
||
**@return** [Boolean] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Module: Waterfowl | ||
|
||
|
||
A mixin for waterfowl creatures. | ||
|
||
|
||
|
||
#Instance Methods | ||
## swim() [](#method-i-swim) | ||
Swimming helper. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name,type,path | ||
Waterfowl,Module,Waterfowl.md | ||
Waterfowl.DEFAULT_DUCK_VELOCITY,Constant,Waterfowl.md#constant-DEFAULT_DUCK_VELOCITY | ||
Waterfowl.DEFAULT_SPEED,Constant,Waterfowl.md#constant-DEFAULT_SPEED | ||
Waterfowl.swim,Method,Waterfowl.md#method-i-swim | ||
Bird,Class,Bird.md | ||
Bird.DEFAULT_DUCK_VELOCITY,Constant,Bird.md#constant-DEFAULT_DUCK_VELOCITY | ||
Bird.DEFAULT_SPEED,Constant,Bird.md#constant-DEFAULT_SPEED | ||
Bird._fly_impl,Method,Bird.md#method-i-_fly_impl | ||
Bird.fly,Method,Bird.md#method-i-fly | ||
Bird.speak,Method,Bird.md#method-i-speak | ||
Duck,Class,Duck.md | ||
Duck.DEFAULT_DUCK_VELOCITY,Constant,Duck.md#constant-DEFAULT_DUCK_VELOCITY | ||
Duck.DEFAULT_SPEED,Constant,Duck.md#constant-DEFAULT_SPEED | ||
Duck.initialize,Method,Duck.md#method-i-initialize | ||
Duck.speak,Method,Duck.md#method-i-speak | ||
Duck.swim,Method,Duck.md#method-i-swim | ||
Duck.useful?,Method,Duck.md#method-i-useful? | ||
Duck.rubber_ducks,Method,Duck.md#method-c-rubber_ducks | ||
domestic,Attribute,Duck.md#attribute-i-domestic | ||
rubber,Attribute,Duck.md#attribute-i-rubber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Module: Aquatic | ||
|
||
|
||
A mixin for aquatic creatures. | ||
|
||
|
||
|
||
#Instance Methods | ||
## swim() [](#method-i-swim) | ||
Swim in the water. | ||
|
||
**@return** [void] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.