Class: Gzlib::Positions
- Inherits:
-
Object
- Object
- Gzlib::Positions
- Includes:
- Enumerable
- Defined in:
- lib/gzlib/positions.rb
Constant Summary collapse
- Search =
'http://opac.gzlib.gov.cn/opac/api/holding/'
Instance Method Summary collapse
- #each(&b) ⇒ Object
-
#initialize(id) ⇒ Positions
constructor
A new instance of Positions.
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 |