class RXCode::Preferences

Provides access to global XCode preferences.

Attributes

defaults[R]

Public Class Methods

new(defaults = nil) click to toggle source
# File lib/rxcode/preferences.rb, line 16
def initialize(defaults = nil)
  defaults ||= Plist::parse_xml(`defaults read com.apple.dt.Xcode | plutil -convert xml1 -o - -`)
  
  @defaults = defaults
end

Public Instance Methods

derived_data_location() click to toggle source
# File lib/rxcode/preferences.rb, line 22
def derived_data_location
  defaults['IDECustomDerivedDataLocation'] || File.expand_path("~/Library/Developer/Xcode/DerivedData")
end
derived_data_location_is_relative_to_workspace?() click to toggle source
# File lib/rxcode/preferences.rb, line 26
def derived_data_location_is_relative_to_workspace?
  !derived_data_location.start_with?('/')
end