Module: Ree::Contracts::ArgContracts

Included in:
Object
Defined in:
lib/ree/contracts/arg_contracts.rb,
lib/ree/contracts/arg_contracts/eq.rb,
lib/ree/contracts/arg_contracts/or.rb,
lib/ree/contracts/arg_contracts/any.rb,
lib/ree/contracts/arg_contracts/bool.rb,
lib/ree/contracts/arg_contracts/none.rb,
lib/ree/contracts/arg_contracts/block.rb,
lib/ree/contracts/arg_contracts/nilor.rb,
lib/ree/contracts/arg_contracts/splat.rb,
lib/ree/contracts/arg_contracts/ksplat.rb,
lib/ree/contracts/arg_contracts/kwargs.rb,
lib/ree/contracts/arg_contracts/set_of.rb,
lib/ree/contracts/arg_contracts/exactly.rb,
lib/ree/contracts/arg_contracts/hash_of.rb,
lib/ree/contracts/arg_contracts/array_of.rb,
lib/ree/contracts/arg_contracts/optblock.rb,
lib/ree/contracts/arg_contracts/range_of.rb,
lib/ree/contracts/arg_contracts/splat_of.rb,
lib/ree/contracts/arg_contracts/squarable.rb,
lib/ree/contracts/arg_contracts/respond_to.rb,
lib/ree/contracts/arg_contracts/subclass_of.rb

Defined Under Namespace

Modules: Squarable Classes: Any, ArrayOf, Block, Bool, Eq, Exactly, HashOf, Ksplat, Kwargs, Nilor, None, Optblock, Or, RangeOf, RespondTo, RestKeys, SetOf, Splat, SplatOf, SubclassOf

Class Method Summary collapse

Class Method Details

.opt_or_block?(contract) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/ree/contracts/arg_contracts.rb', line 26

def self.opt_or_block?(contract)
  contract == Block || contract == Optblock
end