Module: Teckel::Contracts::None
- Defined in:
- lib/teckel/contracts.rb
Overview
Simple contract for enforcing data to be not set or nil
Class Method Summary collapse
-
.[](*args) ⇒ Object
(also: new)
Always return nil.
Class Method Details
.[](*args) ⇒ Object Also known as: new
Always return nil
11 12 13 |
# File 'lib/teckel/contracts.rb', line 11 def [](*args) raise ArgumentError, "None called with arguments" if args.any?(&:itself) end |