Class: SparkleAppcast::Archive

Inherits:
Object
  • Object
show all
Defined in:
lib/sparkle_appcast/archive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Archive

Returns a new instance of Archive.



8
9
10
# File 'lib/sparkle_appcast/archive.rb', line 8

def initialize(path)
  @path = File.expand_path(path)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/sparkle_appcast/archive.rb', line 6

def path
  @path
end

Instance Method Details

#bundle_nameObject



12
13
14
# File 'lib/sparkle_appcast/archive.rb', line 12

def bundle_name
  info_plist["CFBundleDisplayName"] || info_plist["CFBundleName"]
end

#bundle_short_version_stringObject



20
21
22
# File 'lib/sparkle_appcast/archive.rb', line 20

def bundle_short_version_string
  info_plist["CFBundleShortVersionString"]
end

#bundle_versionObject



16
17
18
# File 'lib/sparkle_appcast/archive.rb', line 16

def bundle_version
  info_plist["CFBundleVersion"]
end

#created_atObject



32
33
34
# File 'lib/sparkle_appcast/archive.rb', line 32

def created_at
  File.birthtime(path)
end

#dataObject



40
41
42
# File 'lib/sparkle_appcast/archive.rb', line 40

def data
  File.binread(path)
end

#feed_urlObject



28
29
30
# File 'lib/sparkle_appcast/archive.rb', line 28

def feed_url
  info_plist["SUFeedURL"]
end

#minimum_system_versionObject



24
25
26
# File 'lib/sparkle_appcast/archive.rb', line 24

def minimum_system_version
  info_plist["LSMinimumSystemVersion"]
end

#sizeObject



36
37
38
# File 'lib/sparkle_appcast/archive.rb', line 36

def size
  File.size(path)
end