Module: ShapeOf

Defined in:
lib/shape_of.rb

Defined Under Namespace

Modules: Assertions Classes: Any, Array, Hash, Nothing, Optional, Pattern, Shape, Union, Validator

Constant Summary collapse

Numeric =

Union[Integer, Float, Rational, Complex]

Union[Integer, Float, Rational, Complex].tap do |this|
  this.instance_variable_set(:@class_name, this.name.sub(/Union.*/, 'Numeric'))
end
Boolean =

Union[TrueClass, FalseClass]

Union[TrueClass, FalseClass].tap do |this|
  this.instance_variable_set(:@class_name, this.name.sub(/Union.*/, 'Boolean'))
end