Class: RumbleBundle::Bundle

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

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_hash) ⇒ Bundle

Returns a new instance of Bundle.



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

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

Instance Attribute Details

#charitiesObject

Returns the value of attribute charities.



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

def charities
  @charities
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#productsObject

Returns the value of attribute products.



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

def products
  @products
end

#tiersObject

Returns the value of attribute tiers.



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

def tiers
  @tiers
end

#total_msrpObject

Returns the value of attribute total_msrp.



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

def total_msrp
  @total_msrp
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Class Method Details

.allObject



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

def self.all
  @@all
end