Class: Maze::Formatter::Png::Orthogonal
- Inherits:
-
Object
- Object
- Maze::Formatter::Png::Orthogonal
- Includes:
- Maze::Formatter::Png
- Defined in:
- lib/maze/formatters/png/orthogonal.rb
Constant Summary
Constants included from Maze::Formatter::Png
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#maze ⇒ Object
readonly
Returns the value of attribute maze.
Instance Method Summary collapse
-
#initialize(maze) ⇒ Orthogonal
constructor
A new instance of Orthogonal.
Methods included from Maze::Formatter::Png
Constructor Details
#initialize(maze) ⇒ Orthogonal
Returns a new instance of Orthogonal.
12 13 14 15 16 17 18 |
# File 'lib/maze/formatters/png/orthogonal.rb', line 12 def initialize(maze) @maze = maze @image = ChunkyPNG::Image.new(width, height, background_colour) @lines = [] draw_image end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
8 9 10 |
# File 'lib/maze/formatters/png/orthogonal.rb', line 8 def image @image end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
8 9 10 |
# File 'lib/maze/formatters/png/orthogonal.rb', line 8 def lines @lines end |
#maze ⇒ Object (readonly)
Returns the value of attribute maze.
8 9 10 |
# File 'lib/maze/formatters/png/orthogonal.rb', line 8 def maze @maze end |