Class: Laser::Cutter::Geometry::Dimensions

Inherits:
Tuple
  • Object
show all
Defined in:
lib/laser-cutter/geometry/dimensions.rb

Constant Summary

Constants inherited from Tuple

Tuple::PRECISION

Instance Attribute Summary

Attributes inherited from Tuple

#coords

Instance Method Summary collapse

Methods inherited from Tuple

#clone, #customize_args, #eql?, #initialize, #to_a, #to_s, #valid?

Constructor Details

This class inherits a constructor from Laser::Cutter::Geometry::Tuple

Instance Method Details

#dObject



14
15
16
# File 'lib/laser-cutter/geometry/dimensions.rb', line 14

def d
  coords[2]
end

#hObject



10
11
12
# File 'lib/laser-cutter/geometry/dimensions.rb', line 10

def h
  coords[1]
end

#hash_keysObject



22
23
24
# File 'lib/laser-cutter/geometry/dimensions.rb', line 22

def hash_keys
  [:w, :h, :d]
end

#separatorObject



18
19
20
# File 'lib/laser-cutter/geometry/dimensions.rb', line 18

def separator
  'x'
end

#wObject



6
7
8
# File 'lib/laser-cutter/geometry/dimensions.rb', line 6

def w
  coords[0]
end