I have the following code:
class BookPrice attr_accessor :price def initialize(price) @price = price end def price_in_cents Integer(price*100 +
You need to do:
@price = self.price
to differentiate between your object attribute price and your method parameter price.
price