Class: Hexflex::BaseTemplate
- Inherits:
-
Object
- Object
- Hexflex::BaseTemplate
- Defined in:
- lib/hexflex/base_template.rb
Direct Known Subclasses
Defined Under Namespace
Classes: InterfaceViolation
Instance Attribute Summary collapse
-
#hexaflexagon ⇒ Object
readonly
Returns the value of attribute hexaflexagon.
-
#sides ⇒ Object
readonly
Returns the value of attribute sides.
Instance Method Summary collapse
-
#initialize(hexaflexagon) ⇒ BaseTemplate
constructor
A new instance of BaseTemplate.
- #make_vector ⇒ Object
Constructor Details
#initialize(hexaflexagon) ⇒ BaseTemplate
Returns a new instance of BaseTemplate.
18 19 20 21 |
# File 'lib/hexflex/base_template.rb', line 18 def initialize(hexaflexagon) @hexaflexagon = hexaflexagon @sides = hexaflexagon.sides end |
Instance Attribute Details
#hexaflexagon ⇒ Object (readonly)
Returns the value of attribute hexaflexagon.
16 17 18 |
# File 'lib/hexflex/base_template.rb', line 16 def hexaflexagon @hexaflexagon end |
#sides ⇒ Object (readonly)
Returns the value of attribute sides.
16 17 18 |
# File 'lib/hexflex/base_template.rb', line 16 def sides @sides end |
Instance Method Details
#make_vector ⇒ Object
23 24 25 |
# File 'lib/hexflex/base_template.rb', line 23 def make_vector fail InterfaceViolation end |