Loquacious

Public Class Methods

configuration_for( name, &block ) click to toggle source

Returns the configuration associated with the given name. If a block is given, then it will be used to create the configuration.

The same name can be used multiple times with different configuration blocks. Each different block will be used to add to the configuration; i.e. the configurations are additive.

    # File lib/loquacious.rb, line 18
18:     def configuration_for( name, &block )
19:       ::Loquacious::Configuration.for(name, &block)
20:     end
help_for( name, opts = {} ) click to toggle source

Returns a Help instance for the configuration associated with the given name. See the Help#initialize method for the options that can be used with this method.

    # File lib/loquacious.rb, line 29
29:     def help_for( name, opts = {} )
30:       ::Loquacious::Configuration.help_for(name, opts)
31:     end
libpath( *args, &block ) click to toggle source

Returns the library path for the module. If any arguments are given, they will be joined to the end of the libray path using File.join.

    # File lib/loquacious.rb, line 44
44:     def libpath( *args, &block )
45:       rv =  args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
46:       if block
47:         begin
48:           $LOAD_PATH.unshift LIBPATH
49:           rv = block.call
50:         ensure
51:           $LOAD_PATH.shift
52:         end
53:       end
54:       return rv
55:     end
path( *args, &block ) click to toggle source

Returns the lpath for the module. If any arguments are given, they will be joined to the end of the path using File.join.

    # File lib/loquacious.rb, line 60
60:     def path( *args, &block )
61:       rv = args.empty? ? PATH : ::File.join(PATH, args.flatten)
62:       if block
63:         begin
64:           $LOAD_PATH.unshift PATH
65:           rv = block.call
66:         ensure
67:           $LOAD_PATH.shift
68:         end
69:       end
70:       return rv
71:     end
remove( *args ) click to toggle source

This is merely a convenience method to remove methods from the Loquacious::Configuration class. Some ruby gems add lots of crap to the Kernel module, and this interferes with the configuration system. The remove method should be used to anihilate unwanted methods from the configuration class as needed.

  Loquacious.remove :gem           # courtesy of rubygems
  Loquacious.remove :test, :file   # courtesy of rake
    # File lib/loquacious.rb, line 82
82:     def remove( *args )
83:       args.each { |name|
84:         name = name.to_s.delete('=')
85:         code =           undef_method :#{name} rescue nil          undef_method :#{name}= rescue nil
86:         Loquacious::Configuration.module_eval code
87:         Loquacious::Configuration::DSL.module_eval code
88:       }
89:     end
version() click to toggle source

Returns the version string for the library.

    # File lib/loquacious.rb, line 36
36:     def version
37:       @version ||= File.read(path('version.txt')).strip
38:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.