Module: Scratch::Options

Defined in:
lib/scratch/options.rb

Class Method Summary collapse

Class Method Details

.except_only(options, source) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/scratch/options.rb', line 4

def self.except_only(options, source)
  %w(except only).each do |key|
    options[key] = Array.wrap(options[key]).map &:to_s if options[key]
  end

  (options[:only] || source) - (options[:except] || [])
end