Class: RShade::Filter::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/rshade/filter/default.rb

Constant Summary collapse

RUBY_VERSION_PATTERN =
/ruby-[0-9.]*/

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



6
7
8
# File 'lib/rshade/filter/default.rb', line 6

def self.create
  new.create
end

Instance Method Details

#createObject



10
11
12
# File 'lib/rshade/filter/default.rb', line 10

def create
  [create_exclude]
end

#create_excludeObject



14
15
16
17
18
19
20
21
# File 'lib/rshade/filter/default.rb', line 14

def create_exclude
  filter = ExcludePathFilter.new
  filter.config do |paths|
    excluded_paths.each do |path|
      paths << path
    end
  end
end

#excluded_pathsObject



23
24
25
# File 'lib/rshade/filter/default.rb', line 23

def excluded_paths
  [ENV['GEM_PATH'].split(':'), RUBY_VERSION_PATTERN, /internal/].flatten.compact
end