Module: Kiba::Extend::Destinations::Destinationable

Includes:
Registry::Fileable
Included in:
CSV, JsonArray, Lambda, Marc
Defined in:
lib/kiba/extend/destinations/destinationable.rb

Overview

Mix-in module for extending destinations so they can be set up in jobs

Since:

  • 4.0.0

Instance Method Summary collapse

Methods included from Registry::Fileable

#default_args, #default_file_options, #labeled_options, #options_key, #path_key, #requires_path?

Instance Method Details

#as_source_classObject

Returns:

  • Constant if there is a Sources class for reading the output of jobs that have this class as their destination

  • Nil if results of a job with this destination cannot be used as a source for another job

Raises:

  • (NotImplementedError)

Since:

  • 4.0.0



17
18
19
20
# File 'lib/kiba/extend/destinations/destinationable.rb', line 17

def as_source_class
  raise NotImplementedError,
    ":as_source_class must be defined in extending class"
end

#is_destination?Boolean

Returns true.

Returns:

  • (Boolean)

    true

Since:

  • 4.0.0



23
24
25
# File 'lib/kiba/extend/destinations/destinationable.rb', line 23

def is_destination?
  true
end

#special_optionsObject

Returns Array of defined special options for class.

Returns:

  • Array of defined special options for class

Raises:

  • (NotImplementedError)

Since:

  • 4.0.0



28
29
30
31
# File 'lib/kiba/extend/destinations/destinationable.rb', line 28

def special_options
  raise NotImplementedError,
    ":special_options must be defined in extending class"
end