Class: Douban::Book

Inherits:
Subject show all
Defined in:
lib/douban/subject.rb

Instance Method Summary collapse

Methods inherited from Subject

#aka, #akas, attr_names, #subject_id

Methods included from Equal

#==

Constructor Details

#initialize(atom) ⇒ Book

Returns a new instance of Book.



116
117
118
# File 'lib/douban/subject.rb', line 116

def initialize(atom)
  super(atom)
end

Instance Method Details

#isbnObject



128
129
130
# File 'lib/douban/subject.rb', line 128

def isbn
  isbn13 ? isbn13 : isbn10
end

#isbn10Object



120
121
122
# File 'lib/douban/subject.rb', line 120

def isbn10
  @attribute["isbn10"].first rescue nil
end

#isbn13Object



124
125
126
# File 'lib/douban/subject.rb', line 124

def isbn13
  @attribute["isbn13"].first rescue nil
end