Sha256: 039a57275b90271f536aa96a08330bf93399011a90b4c68cecb45d7dcca04236

Contents?: true

Size: 567 Bytes

Versions: 3

Compression:

Stored size: 567 Bytes

Contents

require "app_store/caller"
require "app_store/helpers/plist"

# Implements basic operations for AppStore objects : initialization, plist parsing, ...
class AppStore::Base
  attr_reader :raw
  
  extend AppStore::Helper::Plist
  
  # Instanciate a new object.
  # <tt>attrs</tt> accepts:
  # * <tt>:plist</tt>: a plist object to be parsed
  def initialize(attrs = {})
    init_from_plist attrs[:plist] if attrs[:plist]
  end
  
  protected
  def init_from_plist(plist)
    custom_init_from_plist plist if respond_to?(:custom_init_from_plist)
    @raw = plist
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
app_store-0.0.4 lib/app_store/base.rb
app_store-0.0.3 lib/app_store/base.rb
app_store-0.0.1 lib/app_store/base.rb