File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
12# frozen_string_literal: false
23require 'java'
34require_relative '../rpextras'
@@ -55,10 +56,10 @@ def self.inherited(subclass)
5556
5657 class << self
5758 # Handy getters and setters on the class go here:
58- attr_accessor :sketch_class , :library_loader
59+ attr_reader :sketch_class , :library_loader
5960
6061 def load_libraries ( *args )
61- library_loader ||= LibraryLoader . new
62+ @ library_loader ||= LibraryLoader . new
6263 library_loader . load_library ( *args )
6364 end
6465 alias load_library load_libraries
@@ -122,8 +123,8 @@ def sketch_title(title)
122123 surface . set_title ( title )
123124 end
124125
125- def sketch_path ( spath = nil )
126- return super ( ) if spath . nil ?
126+ def sketch_path ( spath = '' )
127+ return super ( ) if spath . empty ?
127128 super ( spath )
128129 end
129130
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ def set_processing_root
3131 end
3232
3333 def root_exist?
34- return false if config . nil ?
34+ return false if config . empty ?
3535 File . exist? config [ 'PROCESSING_ROOT' ]
3636 end
3737
3838 def config
3939 k9config = File . expand_path ( "#{ home } /.jruby_art/config.yml" )
40- return nil unless File . exist? k9config
40+ return '' unless File . exist? k9config
4141 YAML . load_file ( k9config )
4242 end
4343
You can’t perform that action at this time.
0 commit comments