Module: Applb::Filterable

Included in:
Client
Defined in:
lib/applb/filterable.rb

Instance Method Summary collapse

Instance Method Details

#target?(lb_name) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
7
8
9
10
11
# File 'lib/applb/filterable.rb', line 3

def target?(lb_name)
  unless @options[:includes].empty?
    return @options[:includes].include?(lb_name)
  end
  unless @options[:excludes].empty?
    return !@options[:excludes].any? { |regex| lb_name =~ regex }
  end
  true
end