Class: Crucigrama::Crossword

Inherits:
Object
  • Object
show all
Includes:
Definitions, Grid, LineQuery, Serializable, WordQuery, Positionable
Defined in:
lib/crucigrama/crossword.rb

Overview

TODO:

Refactor methods to modules Crucigrama::Crossword::Grid, Crucigrama::Crossword::WordQuery and Crucigrama::Crossword::Definitions

TODO:

Define public API and make everything else private

This class represents a crossword

Defined Under Namespace

Modules: Definitions, Grid, LineQuery, PdfPrintable, Serializable, WordQuery

Constant Summary collapse

BLACK =

The symbol used to represent empty cells on the crossword, that is, cells occupied by no word characters

'#'

Instance Method Summary collapse

Methods included from Positionable

#direction_other_than, #position

Methods included from Serializable

#attributes, #serialized_definitions, #to_json

Methods included from Definitions

#add_definition, #definition_for, #definitions, #definitions=, #initialize, #remove_definition

Methods included from WordQuery

#black_positions, #can_set_word?, #word_at, #word_at?, #word_positions, #words

Methods included from LineQuery

#column, #row

Methods included from Grid

#add, #char_at, #dimensions, #grid, #grid=, #initialize, #line, #lines

Instance Method Details

#to_sObject



34
35
36
# File 'lib/crucigrama/crossword.rb', line 34

def to_s
  "\n#{grid}"
end