Class: Primalize::Single::Float

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) ⇒ Float

Returns a new instance of Float.



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
  ::Float === value
end

#inspectObject



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

def inspect
  'float'
end