Module: Banzai::Pipeline
- Defined in:
- lib/banzai/pipeline.rb,
lib/banzai/pipeline/gfm_pipeline.rb,
lib/banzai/pipeline/atom_pipeline.rb,
lib/banzai/pipeline/base_pipeline.rb,
lib/banzai/pipeline/full_pipeline.rb,
lib/banzai/pipeline/note_pipeline.rb,
lib/banzai/pipeline/wiki_pipeline.rb,
lib/banzai/pipeline/email_pipeline.rb,
lib/banzai/pipeline/emoji_pipeline.rb,
lib/banzai/pipeline/label_pipeline.rb,
lib/banzai/pipeline/markup_pipeline.rb,
lib/banzai/pipeline/combined_pipeline.rb,
lib/banzai/pipeline/ascii_doc_pipeline.rb,
lib/banzai/pipeline/description_pipeline.rb,
lib/banzai/pipeline/pre_process_pipeline.rb,
lib/banzai/pipeline/single_line_pipeline.rb,
lib/banzai/pipeline/post_process_pipeline.rb,
lib/banzai/pipeline/quick_action_pipeline.rb,
lib/banzai/pipeline/plain_markdown_pipeline.rb,
lib/banzai/pipeline/broadcast_message_pipeline.rb,
lib/banzai/pipeline/commit_description_pipeline.rb,
lib/banzai/pipeline/service_desk_email_pipeline.rb,
lib/banzai/pipeline/jira_import/adf_commonmark_pipeline.rb,
lib/banzai/pipeline/incident_management/timeline_event_pipeline.rb
Defined Under Namespace
Modules: CombinedPipeline, IncidentManagement, JiraImport Classes: AsciiDocPipeline, AtomPipeline, BasePipeline, BroadcastMessagePipeline, CommitDescriptionPipeline, DescriptionPipeline, EmailPipeline, EmojiPipeline, FullPipeline, GfmPipeline, LabelPipeline, MarkupPipeline, NotePipeline, PlainMarkdownPipeline, PostProcessPipeline, PreProcessPipeline, QuickActionPipeline, ServiceDeskEmailPipeline, SingleLinePipeline, WikiPipeline
Class Method Summary collapse
-
.[](name) ⇒ Object
Resolve a pipeline by name.
Class Method Details
.[](name) ⇒ Object
Resolve a pipeline by name
name - nil, Class or Symbol. The name to be resolved.
Examples:
Pipeline[nil] # => Banzai::Pipeline::FullPipeline
Pipeline[:label] # => Banzai::Pipeline::LabelPipeline
Pipeline[StatusPage::Pipeline::PostProcessPipeline] # => StatusPage::Pipeline::PostProcessPipeline
Pipeline['label'] # => raises ArgumentError - unsupport type
Pipeline[Project] # => raises ArgumentError - not a subclass of BasePipeline
Returns a pipeline class which is a subclass of Banzai::Pipeline::BasePipeline.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/banzai/pipeline.rb', line 18 def self.[](name) name ||= FullPipeline pipeline = case name when Class name when Symbol const_get("#{name.to_s.camelize}Pipeline", false) end return pipeline if pipeline && pipeline < BasePipeline raise ArgumentError, "unsupported pipeline name #{name.inspect} (#{name.class})" end |