module Teckel::Contracts::None

Simple contract for enforcing data to be not set or nil

Public Class Methods

[](*args) click to toggle source

Always return nil @return nil @raise [ArgumentError] when called with any non-nil arguments

# File lib/teckel/contracts.rb, line 11
def [](*args)
  raise ArgumentError, "None called with arguments" if args.any?(&:itself)
end
Also aliased as: new
new(*args)
Alias for: []