Bones::App::Command::ClassMethods

Public Instance Methods

description( *args ) click to toggle source
     # File lib/bones/app/command.rb, line 168
168:     def description( *args )
169:       @description = args.join("\n") unless args.empty?
170:       @description
171:     end
option( *args, &block ) click to toggle source
     # File lib/bones/app/command.rb, line 178
178:     def option( *args, &block )
179:       args.flatten!
180:       block = args.pop if block.nil? and Proc === args.last
181: 
182:       if block
183:         args.each { |val|
184:           next unless val.instance_of? String
185:           next unless val =~ /^--(\w+)/
186: 
187:           args << "__#$1"
188:           define_method(args.last.to_sym, &block)
189:           options << args
190:           break
191:         }
192:       else
193:         options << (args.length > 1 ? args : args.first )
194:       end
195:     end
options() click to toggle source
     # File lib/bones/app/command.rb, line 197
197:     def options
198:       @options ||= []
199:     end
summary( *args ) click to toggle source
     # File lib/bones/app/command.rb, line 173
173:     def summary( *args )
174:       @summary = args.join("\n") unless args.empty?
175:       @summary
176:     end
synopsis( *args ) click to toggle source
     # File lib/bones/app/command.rb, line 163
163:     def synopsis( *args )
164:       @synopsis = args.join("\n") unless args.empty?
165:       @synopsis
166:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.