Sha256: b2af10bffae8aa4f38802917ba24016c8b4adb68088281021f89c7daed612228

Contents?: true

Size: 1.08 KB

Versions: 9

Compression:

Stored size: 1.08 KB

Contents

# TITLE:
#
#   Ruby Configuration
#
# SUMMARY:
#
#   An extended rendition of the Ruby's standard Config module.
#
# COPYRIGHT:
#
#   Copyright (c) 2006 Thomas Sawyer
#
# LICENSE:
#
#   Ruby License
#
#   This module is free software. You may use, modify, and/or redistribute this
#   software under the same terms as Ruby.
#
#   This program is distributed in the hope that it will be useful, but WITHOUT
#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#   FOR A PARTICULAR PURPOSE.
#
# AUTHORS:
#
#   - Thomas Sawyer


require 'rbconfig'


# = Config
#
module Config

  def self.inspect
    CONFIG.inspect
  end

  # In case rubygems has already defined it.
  unless self.respond_to?(:datadir)
    # Return the path to the data directory associated with the
    # given library/package name. Normally this is just
    #
    #   "#{Config::CONFIG['datadir']}/#{name}"
    #
    # but may be modified by tools like RubyGems to handle
    # versioned data directories.

    def self.datadir(package_name)
      File.join(CONFIG['datadir'], package_name)
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
facets-2.0.0 lib/more/facets/rbconfig.rb
facets-2.0.1 lib/more/facets/rbconfig.rb
facets-2.0.2 lib/more/facets/rbconfig.rb
facets-2.0.3 lib/more/facets/rbconfig.rb
facets-2.0.4 lib/more/facets/rbconfig.rb
facets-2.0.5 lib/more/facets/rbconfig.rb
facets-2.1.0 lib/more/facets/rbconfig.rb
facets-2.1.1 lib/more/facets/rbconfig.rb
facets-2.3.0 lib/more/facets/rbconfig.rb