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, #dynamic_source, #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:, for_job:, data: nil) ⇒ RegisteredDestination
constructor
A new instance of RegisteredDestination.
-
#klass ⇒ Object
Methods inherited from RegisteredFile
Constructor Details
#initialize(key:, for_job:, data: nil) ⇒ RegisteredDestination
Returns a new instance of RegisteredDestination.
18 19 20 21 22 23 24 25 26 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 18 def initialize(key:, for_job:, data: nil) super fail SuppliedEntryError.new(key) if supplied if dynamic_source fail Kiba::Extend::DynamicSourceUseError.new( key, self.class.name, for_job ) end end |
Instance Method Details
#args ⇒ Object
Arguments for calling Kiba Destination class
29 30 31 32 33 34 35 36 37 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 29 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
42 43 44 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 42 def description desc end |
#klass ⇒ Object
46 47 48 |
# File 'lib/kiba/extend/registry/registered_destination.rb', line 46 def klass dest_class end |