Module: Bake::Types::Type

Included in:
Array, Boolean, Decimal, Float, Hash, Input, Integer, Nil, Output, String, Symbol, Tuple
Defined in:
lib/bake/types/any.rb

Overview

An extension module which allows constructing ‘Any` types using the `|` operator.

Instance Method Summary collapse

Instance Method Details

#|(other) ⇒ Object

Create an instance of ‘Any` with the arguments as types.

Parameters:

  • other (Type)

    the alternative type to match.



73
74
75
# File 'lib/bake/types/any.rb', line 73

def | other
  Any.new([self, other])
end