Class: BoxGenerator
- Inherits:
-
Object
- Object
- BoxGenerator
- Defined in:
- lib/box_generator.rb,
lib/box_generator/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ BoxGenerator
constructor
A new instance of BoxGenerator.
- #to_scad ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ BoxGenerator
Returns a new instance of BoxGenerator.
7 8 9 |
# File 'lib/box_generator.rb', line 7 def initialize(settings = {}) self.settings = settings end |
Instance Attribute Details
#settings ⇒ Object
Returns the value of attribute settings.
5 6 7 |
# File 'lib/box_generator.rb', line 5 def settings @settings end |
Instance Method Details
#to_scad ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/box_generator.rb', line 11 def to_scad <<-SCAD #{comments} #{header} difference() { #{main_cube} #{compartiments} #{magnets if magnets?} } SCAD end |