Module: Coradoc::Parser::Asciidoc::Admonition

Included in:
Base
Defined in:
lib/coradoc/parser/asciidoc/admonition.rb

Instance Method Summary collapse

Instance Method Details

#admonition_lineObject

requires atypical syntax for access? | str(‘DANGER’) | str(‘SAFETY PRECAUTION’)



13
14
15
16
17
18
19
20
# File 'lib/coradoc/parser/asciidoc/admonition.rb', line 13

def admonition_line
  admonition_type.as(:admonition_type) >> str(': ') >>
  (
    (text.as(:text) >>
    line_ending.as(:line_break)
    ).repeat(1)
    ).as(:content)
end

#admonition_typeObject



5
6
7
8
9
10
11
12
# File 'lib/coradoc/parser/asciidoc/admonition.rb', line 5

def admonition_type
  str('NOTE') | str('TIP') | str('EDITOR') |
  str('IMPORTANT') | str('WARNING') | str('CAUTION') |
  str('TODO') 
  # requires atypical syntax for access?
  # | str('DANGER')
  # | str('SAFETY PRECAUTION')
end