Sha256: 5e74f4147b0f184f288935a88d5d126d679fa5f60e11b21d6f0fe3b28fbe10f1
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 KB
Contents
require 'active_support/all' require 'nxt_registry' require 'nxt_pipeline/version' require 'nxt_pipeline/logger' require 'nxt_pipeline/pipeline' require 'nxt_pipeline/step' require 'nxt_pipeline/callbacks' require 'nxt_pipeline/error_callback' module NxtPipeline class << self delegate :new, :call, to: Pipeline end def configuration(name, &block) @configurations ||= {} if block_given? raise ArgumentError, "Configuration already defined for #{name}" if @configurations[name].present? @configurations[name] = block else @configurations.fetch(name) end end def constructor(name, default: false, &block) @constructors ||= {} if block_given? raise ArgumentError, "Constructor already defined for #{name}" if @constructors[name].present? default_constructor_name(name) if default @constructors[name] = block else @constructors.fetch(name) end end def default_constructor_name(name = nil) if name.present? raise ArgumentError, "Default constructor #{@default_constructor_name} defined already" if @default_constructor_name.present? @default_constructor_name = name else @default_constructor_name end end module_function :configuration, :constructor, :default_constructor_name end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nxt_pipeline-2.0.0 | lib/nxt_pipeline.rb |