Class: RBS::UnitTest::Convertibles::ToInt

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

Overview

An object with #to_int method

Instance Method Summary collapse

Methods inherited from BlankSlate

#__with_object_methods

Constructor Details

#initialize(value = 3) ⇒ ToInt

Returns a new instance of ToInt.

Parameters:

  • value (Object) (defaults to: 3)


45
46
47
# File 'lib/rbs/unit_test/convertibles.rb', line 45

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

Instance Method Details

#to_intObject

Returns:

  • (Object)


49
50
51
# File 'lib/rbs/unit_test/convertibles.rb', line 49

def to_int
  @value
end