Class: JennCad::DefaultProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/jenncad/default_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#colorsObject

Returns the value of attribute colors.



3
4
5
# File 'lib/jenncad/default_profile.rb', line 3

def colors
  @colors
end

Instance Method Details

#auto_colorsObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/jenncad/default_profile.rb', line 5

def auto_colors
  %w(
    Teal
    DarkOliveGreen
    Aquamarine
    SteelBlue
    LightCoral
    OrangeRed
    MediumVioletRed
    DarkOrchid
    HotPink
  )
end

#chain_movesObject

By default, jenncad will add coordinates of subsequent moves in the output i.e.

.move(x: 10, y: 20).move(x: 10) would result depending on the value of this option:

true = translate([10,20, 0])translate([10, 0, 0])
false = translate([20, 20, 0])

defaults to false



27
28
29
# File 'lib/jenncad/default_profile.rb', line 27

def chain_moves
  false
end

#on_error(file) ⇒ Object

called by the command line interface when receiving error exit status



46
47
48
49
# File 'lib/jenncad/default_profile.rb', line 46

def on_error(file)
  system("echo $'\033]30;#{file}: error\007'")
  puts "error"
end

#on_success(file) ⇒ Object

called by the command line interface when receiving normal exit status



40
41
42
43
# File 'lib/jenncad/default_profile.rb', line 40

def on_success(file)
  system("echo $'\033]30;#{file}: ok\007'")
  puts "ok"
end