class Gzlib::Book

Constants

Attributes

author[R]
id[R]
publisher[R]
title[R]
year[R]

Public Class Methods

new(node) click to toggle source
# File lib/gzlib/book.rb, line 10
def initialize(node)
  @title = node.at_css('.bookmetaTitle').text.strip
  @id = node['bookrecno']
  metas = node.css('div')
  @author = metas[1].at_css('a').text.strip
  @publisher = metas[2].at_css('a').text.strip
  @year = metas[2].text.gsub(/[^\d]/,'')
end

Public Instance Methods

positions() click to toggle source
# File lib/gzlib/book.rb, line 19
def positions
  @poss ||= Gzlib::Positions.new id
end