Class: SparkleAppcast::Bundle

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

Constant Summary collapse

INFO_KEYS =
[
  :bundle_name,
  :bundle_version,
  :bundle_short_version_string,
  :minimum_system_version,
  :feed_url
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Bundle

Returns a new instance of Bundle.



15
16
17
# File 'lib/sparkle_appcast/bundle.rb', line 15

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

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



13
14
15
# File 'lib/sparkle_appcast/bundle.rb', line 13

def path
  @path
end

Instance Method Details

#[](key) ⇒ Object



19
20
21
# File 'lib/sparkle_appcast/bundle.rb', line 19

def [](key)
  info[key]
end

#infoObject



23
24
25
26
27
28
# File 'lib/sparkle_appcast/bundle.rb', line 23

def info
  @info ||= INFO_KEYS.inject({}) do |info, key|
    info[key] = self.send(key)
    info
  end
end