Class: Laser::Cutter::Geometry::Dimensions
- Defined in:
- lib/laser/cutter/geometry/dimensions.rb
Overview
The width, height and depth of a box, written as "WxHxD".
Constant Summary
Constants inherited from Tuple
Instance Attribute Summary
Attributes inherited from Tuple
Instance Method Summary collapse
-
#d ⇒ Float
The depth.
-
#h ⇒ Float
The height.
-
#hash_keys ⇒ Array<Symbol>
The keys a Hash of dimensions uses.
-
#separator ⇒ String
The separator between the values in a String.
-
#w ⇒ Float
The width.
Methods inherited from Tuple
#+, #<, #<=>, #>, #[], #clone, #eql?, #initialize, #to_a, #to_s, #valid?, #x, #x=, #y, #y=
Constructor Details
This class inherits a constructor from Laser::Cutter::Geometry::Tuple
Instance Method Details
#d ⇒ Float
Returns the depth.
20 21 22 |
# File 'lib/laser/cutter/geometry/dimensions.rb', line 20 def d coords.[](2) end |
#h ⇒ Float
Returns the height.
15 16 17 |
# File 'lib/laser/cutter/geometry/dimensions.rb', line 15 def h coords.[](1) end |
#hash_keys ⇒ Array<Symbol>
Returns the keys a Hash of dimensions uses.
30 31 32 |
# File 'lib/laser/cutter/geometry/dimensions.rb', line 30 def hash_keys [:w, :h, :d] end |
#separator ⇒ String
Returns the separator between the values in a String.
25 26 27 |
# File 'lib/laser/cutter/geometry/dimensions.rb', line 25 def separator 'x' end |
#w ⇒ Float
Returns the width.
10 11 12 |
# File 'lib/laser/cutter/geometry/dimensions.rb', line 10 def w coords.[](0) end |