lib/ruby_goes_rogue/rect.rb
# Return each coordinate in the rectangle.
# @yieldparam [Coord]
# @return [Enumerator<:each>] if no block is given.
# @return [self] if a block is given.
Return each coordinate in the rectangle.
Return each coordinate in the rectangle .
def each
      return enum_for(:each) unless block_given?
      yrange.each do |y|
        xrange.each do |x|
          yield Coord.new(x, y)
        end
      end
      self
    end
def each return enum_for ( :each ) unless block_given? yrange . each do | y | xrange . each do | x | yield Coord . new ( x , y ) end end self end
Return each coordinate in the rectangle.
Return each coordinate in the rectangle .
if no block is given.
if no block is given .
Enumerator<:each>
if a block is given.
if a block is given .
self
<not_specific>
None