class Diakonos::Range
Attributes
end_col[RW]
end_row[RW]
start_col[R]
start_row[R]
Public Class Methods
new( start_row, start_col, end_row, end_col )
click to toggle source
# File lib/diakonos/range.rb, line 6 def initialize( start_row, start_col, end_row, end_col ) @start_row, @start_col, @end_row, @end_col = start_row, start_col, end_row, end_col end
Public Instance Methods
contains?(row, col)
click to toggle source
# File lib/diakonos/range.rb, line 10 def contains?(row, col) if row == @start_row @start_col <= col elsif row == @end_row col < @end_col else @start_row < row && row < @end_row end end