Class: Blankity::Range

Inherits:
Blank
  • Object
show all
Defined in:
lib/blankity/value.rb

Overview

A Class which defines ‘#begin`, `#end`, and `#exclude_end?`. It implements RBS’s _Range[T] interface.

Instance Method Summary collapse

Constructor Details

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

Creates a new instance; any additional arguments or block are passed to Blank#initialize.



149
150
151
152
153
154
155
# File 'lib/blankity/value.rb', line 149

def initialize(begin_, end_, exclude_end = false, ...)
  @__begin__ = begin_
  @__end__ = end_
  @__exclude_end__ = exclude_end

  super(...)
end

Instance Method Details

#beginObject



158
# File 'lib/blankity/value.rb', line 158

def begin = @__begin__

#endObject



161
# File 'lib/blankity/value.rb', line 161

def end = @__end__

#exclude_end?Boolean

Returns:

  • (Boolean)


164
# File 'lib/blankity/value.rb', line 164

def exclude_end? = @__exclude_end__