Class: BaseHex
- Inherits:
-
Object
- Object
- BaseHex
- 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.
Instance Attribute Summary collapse
-
#border ⇒ Object
Returns the value of attribute border.
-
#color ⇒ Object
Returns the value of attribute color.
-
#data ⇒ Object
Returns the value of attribute data.
-
#is ⇒ Boolean
readonly
the hexagon cut by the border of the picture.
-
#the ⇒ String
readonly
color of the hexagon an ImageMagic compatible string.
-
#your ⇒ Object
readonly
data, anything you want.
Instance Method Summary collapse
-
#initialize(color = nil, border = nil, data = nil) ⇒ BaseHex
constructor
A new instance of BaseHex.
Constructor Details
#initialize(color = nil, border = nil, data = nil) ⇒ BaseHex
Returns a new instance of 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
#border ⇒ Object
Returns the value of attribute border.
9 10 11 |
# File 'lib/hex/base_hex.rb', line 9 def border @border end |
#color ⇒ Object
Returns the value of attribute color.
9 10 11 |
# File 'lib/hex/base_hex.rb', line 9 def color @color end |
#data ⇒ Object
Returns the value of attribute data.
9 10 11 |
# File 'lib/hex/base_hex.rb', line 9 def data @data end |
#is ⇒ Boolean (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 |
#the ⇒ String (readonly)
color of the hexagon an ImageMagic compatible string
8 9 10 |
# File 'lib/hex/base_hex.rb', line 8 def the @the end |
#your ⇒ Object (readonly)
data, anything you want
8 9 10 |
# File 'lib/hex/base_hex.rb', line 8 def your @your end |