Class Index [+]

Quicksearch

RSpec::Core::RubyProject

Public Class Methods

add_dir_to_load_path(dir) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 14
14:       def add_dir_to_load_path(dir)
15:         $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
16:       end
add_to_load_path(*dirs) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 10
10:       def add_to_load_path(*dirs)
11:         dirs.map {|dir| add_dir_to_load_path(File.join(root, dir))}
12:       end
ascend_until() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 30
30:       def ascend_until
31:         Pathname(File.expand_path('.')).ascend do |path|
32:           return path if yield(path)
33:         end
34:       end
determine_root() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 22
22:       def determine_root
23:         find_first_parent_containing('spec') || '.'
24:       end
find_first_parent_containing(dir) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 26
26:       def find_first_parent_containing(dir)
27:         ascend_until {|path| File.exists?(File.join(path, dir))}
28:       end
root() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 18
18:       def root
19:         @project_root ||= determine_root
20:       end

Private Instance Methods

add_dir_to_load_path(dir) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 14
14:       def add_dir_to_load_path(dir)
15:         $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
16:       end
add_to_load_path(*dirs) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 10
10:       def add_to_load_path(*dirs)
11:         dirs.map {|dir| add_dir_to_load_path(File.join(root, dir))}
12:       end
ascend_until() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 30
30:       def ascend_until
31:         Pathname(File.expand_path('.')).ascend do |path|
32:           return path if yield(path)
33:         end
34:       end
determine_root() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 22
22:       def determine_root
23:         find_first_parent_containing('spec') || '.'
24:       end
find_first_parent_containing(dir) click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 26
26:       def find_first_parent_containing(dir)
27:         ascend_until {|path| File.exists?(File.join(path, dir))}
28:       end
root() click to toggle source
    # File lib/rspec/core/ruby_project.rb, line 18
18:       def root
19:         @project_root ||= determine_root
20:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.