class Book

Public Class Methods

isbn13(isbn) click to toggle source
# File lib/buweb/book.rb, line 28
def self.isbn13(isbn)
  Lisbn.new(isbn.to_s).isbn13
end
isbn_find(isbn) click to toggle source
# File lib/buweb/book.rb, line 24
def self.isbn_find(isbn)
  Book.where(isbn: isbn13(isbn)).first
end

Private Instance Methods

convert_to_isbn13() click to toggle source
# File lib/buweb/book.rb, line 34
def convert_to_isbn13
  self.isbn = Book.isbn13(self.isbn)
end