Class: RumbleBundle::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/rumble_bundle/product.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_hash) ⇒ Product

Returns a new instance of Product.



11
12
13
14
# File 'lib/rumble_bundle/product.rb', line 11

def initialize(data_hash)
  data_hash.each{|key, val| self.send("#{key}=", val)}
  self.class.all << self
end

Instance Attribute Details

#bundleObject

Returns the value of attribute bundle.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def bundle
  @bundle
end

#drm_freeObject

Returns the value of attribute drm_free.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def drm_free
  @drm_free
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def name
  @name
end

#platformsObject

Returns the value of attribute platforms.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def platforms
  @platforms
end

#steam_keyObject

Returns the value of attribute steam_key.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def steam_key
  @steam_key
end

#subtitleObject

Returns the value of attribute subtitle.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def subtitle
  @subtitle
end

#tierObject

Returns the value of attribute tier.



3
4
5
# File 'lib/rumble_bundle/product.rb', line 3

def tier
  @tier
end

Class Method Details

.allObject



7
8
9
# File 'lib/rumble_bundle/product.rb', line 7

def self.all
  @@all
end