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.



181
182
183
# File 'lib/primalize/single.rb', line 181

def initialize &coercion
  @coercion = coercion
end

Instance Method Details

#===(value) ⇒ Object



185
186
187
# File 'lib/primalize/single.rb', line 185

def === value
  ::Float === value
end

#inspectObject



189
190
191
# File 'lib/primalize/single.rb', line 189

def inspect
  'float'
end