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.]*/.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



8
9
10
# File 'lib/rshade/filter/default.rb', line 8

def self.create
  new.create
end

Instance Method Details

#createObject



12
13
14
# File 'lib/rshade/filter/default.rb', line 12

def create
  [create_exclude]
end

#create_excludeObject



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

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

#excluded_pathsObject



25
26
27
# File 'lib/rshade/filter/default.rb', line 25

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