We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3025ecf commit 139bbfcCopy full SHA for 139bbfc
1 file changed
lib/jruby_art/processing_ide.rb
@@ -2,6 +2,8 @@
2
3
# detects processing preferences.txt, extracts sketchbook_path
4
class ProcessingIde
5
+ THREE='sketchbook.path.three='.freeze
6
+ FOUR='sketchbook.path.four='.freeze
7
attr_reader :preferences
8
def initialize
9
@preferences = File.join(ENV['HOME'], '.processing', 'preferences.txt')
@@ -14,9 +16,9 @@ def installed?
14
16
def sketchbook_path
15
17
File.open(preferences, 'r') do |file|
18
file.each_line do |line|
- if /sketchbook/.match?(line)
- return line.tap { |sli| sli.slice!('sketchbook.path.three=') }.chomp
19
- end
+ return line.tap { |sli| sli.slice!(FOUR) }.chomp if /sketchbook.path.four/.match?(line)
20
+
21
+ return line.tap { |sli| sli.slice!(THREE) }.chomp if /sketchbook.path.three/.match?(line)
22
end
23
24
0 commit comments