Class: RBS::UnitTest::Convertibles::CustomRange

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

Overview

An object with #begin, #end, and #exclude_end

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BlankSlate

#__with_object_methods

Constructor Details

#initialize(begin_, end_, exclude_end = false) ⇒ CustomRange

Returns a new instance of CustomRange.

Parameters:

  • begin_ (Object)
  • end_ (Object)
  • exclude_end (Object) (defaults to: false)


157
158
159
160
161
# File 'lib/rbs/unit_test/convertibles.rb', line 157

def initialize(begin_, end_, exclude_end = false)
  @begin = begin_
  @end = end_
  @exclude_end = exclude_end
end

Instance Attribute Details

#beginObject (readonly)

Returns the value of attribute begin.

Returns:

  • (Object)


155
156
157
# File 'lib/rbs/unit_test/convertibles.rb', line 155

def begin
  @begin
end

#endObject (readonly)

Returns the value of attribute end.

Returns:

  • (Object)


155
156
157
# File 'lib/rbs/unit_test/convertibles.rb', line 155

def end
  @end
end

Instance Method Details

#exclude_end?Boolean

Returns:

  • (Boolean)


163
# File 'lib/rbs/unit_test/convertibles.rb', line 163

def exclude_end? = @exclude_end