Method: Bmg::Keys#restrict

Defined in:
lib/bmg/support/keys.rb

#restrict(oldtype, newtype, predicate) ⇒ Object



59
60
61
62
63
# File 'lib/bmg/support/keys.rb', line 59

def restrict(oldtype, newtype, predicate)
  return self if (cs = predicate.constant_variables).empty?
  keys = @keys.map{|k| k - cs }
  Keys.new(keys, false)
end