lib/rhapsody/models/member.rb in rhapsody-0.0.6 vs lib/rhapsody/models/member.rb in rhapsody-0.0.7

- old
+ new

@@ -1,43 +1,48 @@ class Rhapsody::Member - attr_accessor :cobrand, - :cocat, - :email, - :logon, - :firstName, - :id, - :lastName, - :locale, - :country, - :isPublic, - :billingPartnerCode, - :catalog, - :createDate, - :isSuspended, - :tierCode, - :tierName, - :productCode, - :productName, - :expirationDate, - :trialLengthDays, - :isTrial, - :state, - :canStreamOnWeb, - :canStreamOnMobile, - :canStreamOnHomeDevice, - :canStreamOnPC, - :canUpgradeStreams, - :maxStreamCount, - :isPlayBasedTier, - :isMonthlyPlayBasedTier, - :isOneTimePlayBasedTier, - :totalPlays, - :playsRemaining + ATTR_LIST = [ + :cobrand, + :cocat, + :email, + :logon, + :firstName, + :id, + :lastName, + :locale, + :country, + :isPublic, + :billingPartnerCode, + :catalog, + :createDate, + :isSuspended, + :tierCode, + :tierName, + :productCode, + :productName, + :expirationDate, + :trialLengthDays, + :isTrial, + :state, + :canStreamOnWeb, + :canStreamOnMobile, + :canStreamOnHomeDevice, + :canStreamOnPC, + :canUpgradeStreams, + :maxStreamCount, + :isPlayBasedTier, + :isMonthlyPlayBasedTier, + :isOneTimePlayBasedTier, + :totalPlays, + :playsRemaining + ] + attr_accessor *ATTR_LIST + def initialize(options) if options options.each do |key, value| instance_variable_set("@#{key}", value) end end end + end