Skip to content

Instantly share code, notes, and snippets.

class Report
def initialize(title, text)
@title = title
@text = text
end
def output_format(format)
if format == :plain
puts "**#{@title}**"
elsif format == :html
class Customer
attr_reader :name
def initialize(name)
@name = name
@rentals = []
end
def add_rental(arg)
@rentals << arg