Class: Gzlib::Positions

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/gzlib/positions.rb

Constant Summary collapse

Search =
'http://opac.gzlib.gov.cn/opac/api/holding/'

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Positions

Returns a new instance of Positions.



11
12
13
14
# File 'lib/gzlib/positions.rb', line 11

def initialize(id)
  fetch_json id
  merge_holding_loan
end

Instance Method Details

#each(&b) ⇒ Object



16
17
18
# File 'lib/gzlib/positions.rb', line 16

def each &b
  @holdings.each &b
end