Class: AppStore::Base

Inherits:
Object
  • Object
show all
Extended by:
Helper::Plist
Defined in:
lib/app_store/base.rb

Overview

Implements basic operations for AppStore objects : initialization, plist parsing, …

Direct Known Subclasses

Application, Artwork, Category, Company, Image, Link, UserReview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper::Plist

plist

Constructor Details

#initialize(attrs = {}) ⇒ Base

Instanciate a new object. attrs accepts:

  • :plist: a plist object to be parsed



13
14
15
16
# File 'lib/app_store/base.rb', line 13

def initialize(attrs = {})
  init_from_plist attrs.delete(:plist) if attrs[:plist]
  attrs.each { |key, value| instance_variable_set "@#{key}", value}
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/app_store/base.rb', line 6

def raw
  @raw
end