Class: Alma::BibHolding
- Inherits:
-
Object
- Object
- Alma::BibHolding
- Extended by:
- ApiDefaults, Forwardable
- Defined in:
- lib/alma/bib_holding.rb
Instance Attribute Summary collapse
-
#holding ⇒ Object
readonly
Returns the value of attribute holding.
Class Method Summary collapse
Instance Method Summary collapse
- #holding_id ⇒ Object
-
#initialize(holding) ⇒ BibHolding
constructor
A new instance of BibHolding.
Methods included from ApiDefaults
apikey, bibs_base_path, configuration_base_path, headers, items_base_path, region, timeout, users_base_path
Constructor Details
#initialize(holding) ⇒ BibHolding
Returns a new instance of BibHolding.
17 18 19 |
# File 'lib/alma/bib_holding.rb', line 17 def initialize(holding) @holding = holding end |
Instance Attribute Details
#holding ⇒ Object (readonly)
Returns the value of attribute holding.
14 15 16 |
# File 'lib/alma/bib_holding.rb', line 14 def holding @holding end |
Class Method Details
.find(mms_id:, holding_id:) ⇒ Object
8 9 10 11 12 |
# File 'lib/alma/bib_holding.rb', line 8 def self.find(mms_id:, holding_id:) url = "#{bibs_base_path}/#{mms_id}/holdings/#{holding_id}" response = Net.get(url, headers:, timeout:) new(response) end |
Instance Method Details
#holding_id ⇒ Object
21 22 23 |
# File 'lib/alma/bib_holding.rb', line 21 def holding_id holding["holding_id"] end |