class RFlare::Square

Attributes

columns[R]
rows[R]

Public Class Methods

new(rows, columns) click to toggle source
# File lib/rflare.rb, line 15
def initialize rows, columns
  @rows, @columns = rows, columns
end

Public Instance Methods

==(other) click to toggle source
# File lib/rflare.rb, line 34
def == other
  @rows == other.rows and @columns == other.columns
end
each() { |row, col| ... } click to toggle source
# File lib/rflare.rb, line 22
def each
  @rows.each {|row|
    @columns.each {|col|
      yield row, col
    }
  }
end
include?(row, col) click to toggle source
# File lib/rflare.rb, line 30
def include? row, col
  @rows.include? row and @columns.include? col
end