class Book
Attributes
title[RW]
Public Class Methods
new(title, author)
click to toggle source
# File lib/book.rb, line 4 def initialize(title, author) @title = title @author = author end
Public Instance Methods
to_h()
click to toggle source
# File lib/book.rb, line 9 def to_h { title: title, author: author.name } end