### Home Classes Methods

### In Files

- lib/facets/rbconfig.rb

### Methods

- ::datadir
- ::host_os
- ::inspect
- ::method_missing
- #bsd?
- #linux?
- #mac?
- #posix?
- #solaris?
- #symbian?
- #windows?

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Random
- Random::ArrayExtensions
- Random::HashExtensions
- Random::IntegerExtensions
- Random::NumericExtensions
- Random::RangeExtensions
- Random::StringExtensions
- Random::StringExtensions::Self
- FileUtils
- FileUtils::DryRun
- FileUtils::NoWrite
- FileUtils::Verbose
- Digest
- Digest::Class
- Digest::Instance
- Multiton
- Multiton::Inclusive
- Multiton::MetaMethods
- URI
- URI::Hash
- URI::Kernel
- Argvector
- Argvector
- ERB
- ERB::OpenTemplate
- Enumerable
- Enumerable::Arguments
- GetoptLong
- GetoptLong::DSL
- Memoizable
- Memoizable::Copy
- Numeric
- Numeric::Multipliers
- Object
- Object::ArgVector
- Timer
- Timer::Dummy
- Array
- BasicObject
- CGI
- Cloneable
- Continuation
- Date
- DateTime
- Equitable
- File
- Find
- Hash
- Instantiable
- Integer
- Interval
- Kernel
- Math
- Module
- Net
- NilClass
- NullClass
- OpEsc
- OpenStruct
- Pathname
- Platform
- Range
- RbConfig
- Set
- Shellwords
- String
- StringScanner
- Time
- Tuple
- YAML
- Zlib

No matching classes.

# RbConfig

An extended rendition of the Ruby's standard RbConfig module.

### Public Class Methods

datadir(package_name) click to toggle source

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.

    # File lib/facets/rbconfig.rb, line 32
    def self.datadir(package_name)
      File.join(CONFIG['datadir'], package_name)
    end

host_os() click to toggle source

    # File lib/facets/rbconfig.rb, line 38
    def self.host_os
      CONFIG['host_os']
    end

inspect() click to toggle source

    # File lib/facets/rbconfig.rb, line 5
    def self.inspect
      CONFIG.inspect
    end

method_missing(s,*a,&b) click to toggle source

Methodized lookup of config.

    # File lib/facets/rbconfig.rb, line 10
    def self.method_missing(s,*a,&b)
      s = s.to_s
      if CONFIG.key?(s)
        CONFIG[s]
      elsif CONFIG.key?(s.upcase)
        CONFIG[s.upcase]
      else
        super(s,*a,&b)
      end
    end

### Public Instance Methods

bsd?() click to toggle source

    # File lib/facets/rbconfig.rb, line 50
    def bsd?
      host_os =~ /bsd/
    end

linux?() click to toggle source

    # File lib/facets/rbconfig.rb, line 42
    def linux?
      host_os =~ /linux|cygwin/
    end

mac?() click to toggle source

    # File lib/facets/rbconfig.rb, line 46
    def mac?
      host_os =~ /mac|darwin/
    end

posix?() click to toggle source

    # File lib/facets/rbconfig.rb, line 68
    def posix?
      linux? or mac? or bsd? or solaris? or begin
        fork do end
        true
      rescue NotImplementedError, NoMethodError
        false
      end
    end

solaris?() click to toggle source

    # File lib/facets/rbconfig.rb, line 58
    def solaris?
      host_os =~ /solaris|sunos/
    end

symbian?() click to toggle source

TODO: who knows what symbian returns?

    # File lib/facets/rbconfig.rb, line 63
    def symbian?
      host_os =~ /symbian/
    end

windows?() click to toggle source

    # File lib/facets/rbconfig.rb, line 54
    def windows?
      host_os =~ /mswin|mingw/
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.