Class: PurlFetcher::Client::Mods
- Inherits:
-
Object
- Object
- PurlFetcher::Client::Mods
- Defined in:
- lib/purl_fetcher/client/mods.rb
Overview
Create a MODS represenation of Cocina JSON
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(cocina:) ⇒ Mods
constructor
A new instance of Mods.
Constructor Details
#initialize(cocina:) ⇒ Mods
Returns a new instance of Mods.
13 14 15 |
# File 'lib/purl_fetcher/client/mods.rb', line 13 def initialize(cocina:) @cocina = cocina end |
Class Method Details
.create(cocina:) ⇒ Object
8 9 10 |
# File 'lib/purl_fetcher/client/mods.rb', line 8 def self.create(cocina:) new(cocina:).create end |
Instance Method Details
#create ⇒ Object
17 18 19 |
# File 'lib/purl_fetcher/client/mods.rb', line 17 def create response = client.post(path:, body:) end |