Class: Stash::Merritt::SwordHelper
- Inherits:
-
Object
- Object
- Stash::Merritt::SwordHelper
- Defined in:
- lib/stash/merritt/sword_helper.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#package ⇒ Object
readonly
Returns the value of attribute package.
Instance Method Summary collapse
-
#initialize(package:, logger: nil) ⇒ SwordHelper
constructor
A new instance of SwordHelper.
- #submit! ⇒ Object
Constructor Details
#initialize(package:, logger: nil) ⇒ SwordHelper
Returns a new instance of SwordHelper.
9 10 11 12 |
# File 'lib/stash/merritt/sword_helper.rb', line 9 def initialize(package:, logger: nil) @logger = logger @package = package end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/stash/merritt/sword_helper.rb', line 6 def logger @logger end |
#package ⇒ Object (readonly)
Returns the value of attribute package.
7 8 9 |
# File 'lib/stash/merritt/sword_helper.rb', line 7 def package @package end |
Instance Method Details
#submit! ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/stash/merritt/sword_helper.rb', line 14 def submit! if (update_uri = resource.update_uri) do_update(update_uri) else do_create end resource.version_zipfile = zipfile resource.save! end |