class RuboCop::Select::File

Public Class Methods

expand_files(files, base_dir) click to toggle source

TODO: I don't want to access actual file system

# File lib/rubocop/select/file.rb, line 16
def self.expand_files(files, base_dir)
  files.map { |f| Pathname.new(::File.expand_path(f, base_dir)) }
end
intersect( before_files = [], before_base_dir = Dir.pwd, after_files = [], after_base_dir = Dir.pwd ) click to toggle source
# File lib/rubocop/select/file.rb, line 5
def self.intersect(
  before_files = [],
    before_base_dir = Dir.pwd,
    after_files = [],
    after_base_dir = Dir.pwd
)
  expand_files(before_files, before_base_dir) \
  & expand_files(after_files, after_base_dir)
end