lib/ruby_sync/util/utilities.rb in rubysync-0.0.1 vs lib/ruby_sync/util/utilities.rb in rubysync-0.0.2

- old
+ new

@@ -106,10 +106,29 @@ last = base_path base_path = File.expand_path("#{base_path}/..") end return false end - - - + + # Make and instance method _name_ that returns the value set by the + # class method _name_. + # def self.class_option name + # self.class_eval "def #{name}() self.class.instance_variable_get :#{name}; end" + # self.instance_eval "def #{name}(value) @#{name}=value; end" + # end + + def get_preference(name, file_name=nil) + class_name ||= get_preference_file + end + + def set_preference(name) + + end + + def get_preference_file_path name + dir = "#{ENV[HOME]}/.rubysync" + Dir.mkdir(dir) + "#{dir}#{file}" + end + end end \ No newline at end of file