Class: Kiba::Extend::Registry::RegisteredDestination
- Inherits:
-
RegisteredFile
- Object
- RegisteredFile
- Kiba::Extend::Registry::RegisteredDestination
- Defined in:
- lib/kiba/extend/registry/registered_destination.rb
Overview
Value object representing a destination file registered in a FileRegistry
Defined Under Namespace
Classes: SuppliedEntryError
Instance Attribute Summary
Attributes inherited from RegisteredFile
#data, #desc, #dest_class, #dest_opt, #dest_special_opts, #key, #lookup_on, #path, #src_opt, #supplied
Instance Method Summary collapse
-
#args ⇒ Object
Arguments for calling Kiba Destination class.
-
#description ⇒ Object
Description of file.
-
#initialize(key:, data:, for_job:) ⇒ RegisteredDestination
constructor
A new instance of RegisteredDestination.
-
#klass ⇒ Object
Methods inherited from RegisteredFile
Constructor Details
#initialize(key:, data:, for_job:) ⇒ RegisteredDestination
Returns a new instance of RegisteredDestination.
19 20 21 22 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 19 def initialize(key:, data:, for_job:) super fail SuppliedEntryError.new(key) if supplied end |
Instance Method Details
#args ⇒ Object
Arguments for calling Kiba Destination class
25 26 27 28 29 30 31 32 33 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 25 def args return simple_args unless dest_special_opts opts = supported_special_opts warn_about_opts if opts.length < dest_special_opts.length return simple_args if opts.empty? simple_args.merge(supported_special_opts) end |
#description ⇒ Object
Description of file
Used in post-processing STDOUT
38 39 40 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 38 def description desc end |
#klass ⇒ Object
42 43 44 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 42 def klass dest_class end |