Class: RBS::UnitTest::Convertibles::ToI

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

Overview

An object with #to_i method

Instance Method Summary collapse

Methods inherited from BlankSlate

#__with_object_methods

Constructor Details

#initialize(value = 3) ⇒ ToI

Returns a new instance of ToI.

Parameters:

  • value (Object) (defaults to: 3)


35
36
37
# File 'lib/rbs/unit_test/convertibles.rb', line 35

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

Instance Method Details

#to_iObject

Returns:

  • (Object)


39
40
41
# File 'lib/rbs/unit_test/convertibles.rb', line 39

def to_i
  @value
end