Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_element(row, column)
- assert(row > 0, "Row cannot be negative.")
- assert(column > 0, "Column cannot be negative.")
- assert(row < @row_size, "Row out of bounds.")
- assert(column < @column_size, "Column out of bounds.")
- result = @dictionary_of_keys[[row, column]]
- assert(@dictionary_of_keys[[row, column]].is_a?(Numeric))
- end
- alias_method :get, :get_element
- # alias_method :[], :get_element
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement