Class: RBS::UnitTest::Convertibles::ToF

Inherits:
BlankSlate
  • Object
show all
Defined in:
sig/unit_test/convertibles.rbs,
lib/rbs/unit_test/convertibles.rb

Overview

An object with #to_f method

Instance Method Summary collapse

Methods inherited from BlankSlate

#__with_object_methods

Constructor Details

#initialize(value = 0.1) ⇒ ToF

Returns a new instance of ToF.

Parameters:

  • value (Object) (defaults to: 0.1)


55
56
57
# File 'lib/rbs/unit_test/convertibles.rb', line 55

def initialize(value = 0.1)
  @value = value
end

Instance Method Details

#to_fObject

Returns:

  • (Object)


59
60
61
# File 'lib/rbs/unit_test/convertibles.rb', line 59

def to_f
  @value
end