Module: Jerakia::Lookup::Plugin

Defined in:
lib/jerakia/plugins/lookup/confine.rb

Instance Method Summary collapse

Instance Method Details

#confine(key = nil, match) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/jerakia/plugins/lookup/confine.rb', line 4

def confine(key=nil,match)
  if key
    invalidate unless key[Regexp.new(match)] == key
  else
    invalidate
  end
end

#exclude(key = nil, match) ⇒ Object



12
13
14
15
16
# File 'lib/jerakia/plugins/lookup/confine.rb', line 12

def exclude(key=nil,match)
  if key
    invalidate if key[Regexp.new(match)] == key
  end
end