Class: LemonadeStand::Choice

Inherits:
Object
  • Object
show all
Defined in:
lib/lemonade_stand/choice.rb

Constant Summary collapse

HIGH_PRICE =
10.0
DEMAND =
30.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#glasses_madeObject

Returns the value of attribute glasses_made.



9
10
11
# File 'lib/lemonade_stand/choice.rb', line 9

def glasses_made
  @glasses_made
end

#price_per_glassObject

Returns the value of attribute price_per_glass.



8
9
10
# File 'lib/lemonade_stand/choice.rb', line 8

def price_per_glass
  @price_per_glass
end

#signsObject

Returns the value of attribute signs.



7
8
9
# File 'lib/lemonade_stand/choice.rb', line 7

def signs
  @signs
end

Instance Method Details

#max_salesObject



11
12
13
# File 'lib/lemonade_stand/choice.rb', line 11

def max_sales
  sales_factor + (sales_factor * signs_factor)
end