module RubyGrid
Constants
- BOTTOM
- BOTTOM_LEFT
- BOTTOM_RIGHT
- CENTER
- LEFT
- NIL_VALUE
- NOT_VALID
- OUTSIDE
Some constant values. These are set as strings instead of integer values to prevent clashes of data.
- RIGHT
- TINY
- TOP
- TOP_LEFT
Traversal Vector Constants
- TOP_RIGHT
- VERSION
Public Class Methods
create(x, y, value)
click to toggle source
Wrapper for Grid#new
# File lib/rubygrid.rb, line 24 def RubyGrid.create(x, y, value) return Grid.new(x, y, value) end
get_all_vectors() { |vector_constant| ... }
click to toggle source
Yields each of the vector constants in turn, from top-left to bottom-right.
# File lib/rubygrid.rb, line 30 def RubyGrid.get_all_vectors # :yields: vector_constant [TOP_LEFT, TOP, TOP_RIGHT, LEFT, CENTER, RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT ].each do |v| yield v # :yields: vector_constant end end