doc/Tutorial in bahuvrihi-tap-0.11.0 vs doc/Tutorial in bahuvrihi-tap-0.11.1

- old
+ new

@@ -25,11 +25,11 @@ % rap goodnight --help Goodnight -- your basic goodnight moon task -------------------------------------------------------------------------------- Says goodnight with a configurable message. -------------------------------------------------------------------------------- - usage: tap run -- goodnight obj + usage: rap goodnight OBJ configurations: --message MESSAGE options: @@ -43,11 +43,11 @@ [Tapfile] # make the declarations available everywhere # (normally they're accessed via Tap, as above) - extend Tap::Declarations + include Tap::Declarations namespace :example do task(:say, :message) do |task, args| print(args.message || 'goodnight') end @@ -108,11 +108,11 @@ hello.message # => 'hello' hello.process('world') # => 'hello world' Totally straightforward. Goodnight stores the default configurations, each instance has accessors to the configurations, and the defaults may be overridden during initialization, or later. Class definitions allow validation/transformation blocks to be specified for configurations. These blocks process inputs (ex the string inputs from the command line), quite literally defining the writer for a configuration accessor. A set of standard blocks are available through +c+, an alias for the Tap::Support::Validation module. - [Tapfile] + [lib/goodnight.rb] # Goodnight::manifest a fancy goodnight moon task # Says goodnight with a configurable message. class Goodnight < Tap::Task config :message, 'goodnight' # a goodnight message @@ -152,10 +152,10 @@ % rap goodnight --help Goodnight -- a fancy goodnight moon task -------------------------------------------------------------------------------- Says goodnight with a configurable message. -------------------------------------------------------------------------------- - usage: tap run -- goodnight OBJECTS... + usage: rap goodnight OBJECTS... configurations: --message MESSAGE a goodnight message --[no-]reverse reverses the message --n N repeats message n times \ No newline at end of file