Class: Laser::Cutter::Notching::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/laser/cutter/notching/base.rb

Overview

The base of a notching strategy for one Edge.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(edge) ⇒ Base

Returns a new instance of Base.

Parameters:

  • edge (Edge) —

    the side to notch



13
14
15
# File 'lib/laser/cutter/notching/base.rb', line 13

def initialize(edge)
  @edge = edge
end

Instance Attribute Details

#edge ⇒ Edge

Returns the side to notch.

Returns:

  • (Edge) —

    the side to notch



10
11
12
# File 'lib/laser/cutter/notching/base.rb', line 10

def edge
  @edge
end

Instance Method Details

#notches ⇒ Array<Geometry::Line>

Each strategy implements it.

Returns:

Raises:

  • (RuntimeError) —

    when the strategy does not implement it



21
22
23
# File 'lib/laser/cutter/notching/base.rb', line 21

def notches
  raise 'Abstract method'
end