Class: SparkleAppcast::Archive
- Inherits:
-
Object
- Object
- SparkleAppcast::Archive
- Defined in:
- lib/sparkle_appcast/archive.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #bundle_name ⇒ Object
- #bundle_short_version_string ⇒ Object
- #bundle_version ⇒ Object
- #created_at ⇒ Object
- #data ⇒ Object
- #feed_url ⇒ Object
-
#initialize(path) ⇒ Archive
constructor
A new instance of Archive.
- #minimum_system_version ⇒ Object
- #size ⇒ Object
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.(path) end |
Instance Attribute Details
#path ⇒ Object (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_name ⇒ Object
12 13 14 |
# File 'lib/sparkle_appcast/archive.rb', line 12 def bundle_name info_plist["CFBundleDisplayName"] || info_plist["CFBundleName"] end |
#bundle_short_version_string ⇒ Object
20 21 22 |
# File 'lib/sparkle_appcast/archive.rb', line 20 def bundle_short_version_string info_plist["CFBundleShortVersionString"] end |
#bundle_version ⇒ Object
16 17 18 |
# File 'lib/sparkle_appcast/archive.rb', line 16 def bundle_version info_plist["CFBundleVersion"] end |
#created_at ⇒ Object
32 33 34 |
# File 'lib/sparkle_appcast/archive.rb', line 32 def created_at File.birthtime(path) end |
#data ⇒ Object
40 41 42 |
# File 'lib/sparkle_appcast/archive.rb', line 40 def data File.binread(path) end |
#feed_url ⇒ Object
28 29 30 |
# File 'lib/sparkle_appcast/archive.rb', line 28 def feed_url info_plist["SUFeedURL"] end |
#minimum_system_version ⇒ Object
24 25 26 |
# File 'lib/sparkle_appcast/archive.rb', line 24 def minimum_system_version info_plist["LSMinimumSystemVersion"] end |
#size ⇒ Object
36 37 38 |
# File 'lib/sparkle_appcast/archive.rb', line 36 def size File.size(path) end |