Class: Primalize::Single::Integer

Inherits:
Object
  • Object
show all
Includes:
Type
Defined in:
lib/primalize/single.rb

Constant Summary

Constants included from Type

Type::DEFAULT_COERCION

Instance Method Summary collapse

Methods included from Type

#coerce

Constructor Details

#initialize(&coercion) ⇒ Integer

Returns a new instance of Integer.



165
166
167
# File 'lib/primalize/single.rb', line 165

def initialize &coercion
  @coercion = coercion
end

Instance Method Details

#===(value) ⇒ Object



169
170
171
# File 'lib/primalize/single.rb', line 169

def === value
  ::Integer === value
end

#inspectObject



173
174
175
# File 'lib/primalize/single.rb', line 173

def inspect
  'integer'
end