Class: AppStore::Base
- Inherits:
-
Object
- Object
- AppStore::Base
- 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
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Base
constructor
Instanciate a new object.
Methods included from Helper::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
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/app_store/base.rb', line 6 def raw @raw end |