Class: Kiba::Extend::Registry::RegisteredSource
- Inherits:
-
RegisteredFile
- Object
- RegisteredFile
- Kiba::Extend::Registry::RegisteredSource
- Includes:
- Ancestorable, RequirableFile
- Defined in:
- lib/kiba/extend/registry/registered_source.rb
Overview
Value object representing a RegistryEntry being used as a job source
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 ⇒ Hash
Arguments for calling Kiba Source class.
-
#initialize(key:, for_job:, data: nil) ⇒ RegisteredSource
constructor
A new instance of RegisteredSource.
-
#klass ⇒ Object
Methods included from RequirableFile
Methods included from Ancestorable
#edge, #edge_label, #edge_source_id, #edge_target_id, #node, #node_id, #source?
Methods included from NodeLabelable
#node_label, #node_qualification
Methods inherited from RegisteredFile
Constructor Details
#initialize(key:, for_job:, data: nil) ⇒ RegisteredSource
Returns a new instance of RegisteredSource.
22 23 24 25 26 27 28 29 |
# File 'lib/kiba/extend/registry/registered_source.rb', line 22 def initialize(key:, for_job:, data: nil) super if dynamic_source fail Kiba::Extend::DynamicSourceUseError.new( key, self.class.name, for_job ) end end |
Instance Method Details
#args ⇒ Hash
Arguments for calling Kiba Source class
33 34 35 |
# File 'lib/kiba/extend/registry/registered_source.rb', line 33 def args {src_class.path_key => path}.merge(src_opts) end |
#klass ⇒ Object
37 38 39 |
# File 'lib/kiba/extend/registry/registered_source.rb', line 37 def klass src_class end |