Class: Docks::Tags::Variation

Inherits:
Base
  • Object
show all
Defined in:
lib/docks/tags/variation_tag.rb

Direct Known Subclasses

State, Variant

Constant Summary

Constants included from Processors

Processors::CODE_BLOCK_INDICATOR, Processors::HEADING_INDICATOR, Processors::HEADING_UNDERLINE_INDICATOR, Processors::LIST_ITEM_INDICATOR

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#multiline?, #multiple_allowed?, #parseable?, #process, #synonyms, #type

Methods included from Processors

#code_block_with_language_and_description, #ensure_valid_demo_type, #join_with_smart_line_breaks, #multiline_description, #name_and_parenthetical, #parenthetical_options, #split_on_characters, #split_on_commas_spaces_and_pipes, #split_on_top_level_parens_commas_and_pipes, #split_types, #stringy_boolean

Constructor Details

#initializeVariation

Returns a new instance of Variation.



6
7
8
9
10
# File 'lib/docks/tags/variation_tag.rb', line 6

def initialize
  @name = :variation
  @parseable = false
  @multiple_allowed = true
end

Instance Method Details

#setup_post_processorsObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/docks/tags/variation_tag.rb', line 12

def setup_post_processors
  after_each_pattern(:early) do |pattern|
    join_variations_to_components(pattern)
    clean_variation_names(pattern)
  end

  after_each_pattern(:late) do |pattern|
    pattern.components.each { |component| mirror_preclusions(component) }
  end
end