Module: Backports::StdLib

### Home Classes Methods

### In Files

- lib/backports/tools.rb

### Namespace

- CLASS Backports::StdLib::LoadedFeatures

### Methods

- ::extend_relative

### Class/Module Index

Quicksearch

- Prime
- Prime::EratosthenesGenerator
- Prime::EratosthenesSieve
- Prime::Generator23
- Prime::OldCompatibility
- Prime::PseudoPrimeGenerator
- Prime::TrialDivision
- Prime::TrialDivisionGenerator
- Backports
- Backports::MOST_EXTREME_OBJECT_EVER
- Backports::StdLib
- Backports::StdLib::LoadedFeatures
- Enumerator
- Enumerator::GeneratorBP
- Enumerator::Lazy
- Enumerator::Yielder
- Matrix
- Matrix::EigenvalueDecomposition
- Matrix::LUPDecomposition
- Random
- Random::Implementation
- Random::MT19937
- Enumerable
- Enumerable::Enumerator
- File
- File::Constants
- ARGF
- Array
- BasicObject
- Binding
- Complex
- Dir
- ENV
- Fixnum
- Float
- GC
- Hash
- IO
- Integer
- Kernel
- Math
- Method
- Module
- NilClass
- Numeric
- Object
- ObjectSpace
- OpenStruct
- Proc
- Process
- Range
- Regexp
- Set
- StopIteration
- String
- Struct
- Symbol
- UnboundMethod

No matching classes.

# Backports::StdLib

### Attributes

extended_lib[RW]

### Public Class Methods

extend_relative(relative_dir="stdlib") click to toggle source

    # File lib/backports/tools.rb, line 65
    def extend_relative relative_dir="stdlib"
      loaded = Backports::StdLib::LoadedFeatures.new
      dir = File.expand_path(relative_dir, File.dirname(caller.first.split(/:\d/,2).first))
      Dir.entries(dir).
        map{|f| Regexp.last_match(1) if /^(.*)\.rb$/ =~ f}.
        compact.
        each do |f|
          path = File.expand_path(f, dir)
          if loaded.include?(f)
            require path
          else
            @extended_lib[f] << path
          end
        end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.