Module: Cordon::Whitelist

Defined in:
lib/cordon/whitelist.rb

Constant Summary collapse

TheList =
[]

Class Method Summary collapse

Class Method Details

.admit_one(object) ⇒ Object



5
6
7
# File 'lib/cordon/whitelist.rb', line 5

def self.admit_one(object)
  TheList << object
end

.admits?(instance) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/cordon/whitelist.rb', line 9

def self.admits?(instance)
  !! TheList.delete(instance)
end