# File lib/bones/app/command.rb, line 168
168: def description( *args )
169: @description = args.join("\n") unless args.empty?
170: @description
171: end
# 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
# File lib/bones/app/command.rb, line 197
197: def options
198: @options ||= []
199: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.