class Bundle
Attributes
path[RW]
Public Class Methods
new(path)
click to toggle source
# File lib/bundle.rb, line 6 def initialize(path) self.path = path.strip end
Public Instance Methods
bundle_identifier()
click to toggle source
# File lib/bundle.rb, line 18 def bundle_identifier defaults_read("CFBundleIdentifier") end
defaults_read(key)
click to toggle source
# File lib/bundle.rb, line 26 def defaults_read(key) plist_path = "#{path}/Contents/Info" `defaults read "#{plist_path}" #{key}`.strip end
defaults_write(*args)
click to toggle source
# File lib/bundle.rb, line 31 def defaults_write(*args) plist_path = "#{path}/Contents/Info" command = "defaults write \"#{plist_path}\" #{args.join(' ')}" if CLI.dry_run? puts command else `#{command}`.strip end end
info_path()
click to toggle source
# File lib/bundle.rb, line 14 def info_path "#{path}/Contents/Info.plist" end
valid?()
click to toggle source
# File lib/bundle.rb, line 10 def valid? false end
version()
click to toggle source
# File lib/bundle.rb, line 22 def version defaults_read('CFBundleShortVersionString') end