File: book.rb

package info (click to toggle)
ruby-six 0.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: ruby: 295; makefile: 6
file content (11 lines) | stat: -rw-r--r-- 216 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
class Book
  attr_accessor :name, :public, :author

  def initialize(name, author, is_public = true)
    @name, @author, @public = name, author, is_public
  end

  def author?(author)
    @author == author
  end
end