Class: BaseHex

Inherits:
Object
  • Object
show all
Defined in:
lib/hex/base_hex.rb

Overview

This is the base hexagon class designed to be derived into axial and cube hexagons. Sould never been instancied.

Direct Known Subclasses

AxialHex, CubeHex

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color = nil, border = nil, data = nil) ⇒ BaseHex



11
12
13
14
15
# File 'lib/hex/base_hex.rb', line 11

def initialize( color = nil, border = nil, data = nil )
  @color = color
  @border = border
  @data = data
end

Instance Attribute Details

#borderObject

Returns the value of attribute border.



9
10
11
# File 'lib/hex/base_hex.rb', line 9

def border
  @border
end

#colorObject

Returns the value of attribute color.



9
10
11
# File 'lib/hex/base_hex.rb', line 9

def color
  @color
end

#dataObject

Returns the value of attribute data.



9
10
11
# File 'lib/hex/base_hex.rb', line 9

def data
  @data
end

#isBoolean (readonly)

the hexagon cut by the border of the picture



8
9
10
# File 'lib/hex/base_hex.rb', line 8

def is
  @is
end

#theString (readonly)

color of the hexagon an ImageMagic compatible string



8
9
10
# File 'lib/hex/base_hex.rb', line 8

def the
  @the
end

#yourObject (readonly)

data, anything you want



8
9
10
# File 'lib/hex/base_hex.rb', line 8

def your
  @your
end