Class: Ree::Contracts::Validators

Inherits:
Object
  • Object
show all
Defined in:
lib/ree/contracts/validators.rb

Constant Summary collapse

FORBIDDEN_CONTRACTS =
Set.new([
  ArgContracts::None, ArgContracts::Kwargs,
  ArgContracts::Block, ArgContracts::Optblock,
  ArgContracts::SplatOf, ArgContracts::Splat
])

Class Method Summary collapse

Class Method Details

.fetch_for(contract) ⇒ Object



14
15
16
# File 'lib/ree/contracts/validators.rb', line 14

def fetch_for(contract)
  validators[contract.object_id] ||= build(contract)
end