This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Report | |
def initialize(title, text) | |
@title = title | |
@text = text | |
end | |
def output_format(format) | |
if format == :plain | |
puts "**#{@title}**" | |
elsif format == :html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customer | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
@rentals = [] | |
end | |
def add_rental(arg) | |
@rentals << arg |