Module: Coradoc::Parser::Asciidoc::Header
- Includes:
- Base
- Included in:
- Base
- Defined in:
- lib/coradoc/parser/asciidoc/header.rb
Instance Method Summary
collapse
Methods included from Base
#attribute_name, #attribute_value, #date, #digit, #digits, #email, #empty_line, #endline, #keyword, #line_ending, #newline, #rich_text, #rich_texts, #space, #space?, #special_character, #text, #word, #words
Instance Method Details
#author ⇒ Object
19
20
21
22
23
|
# File 'lib/coradoc/parser/asciidoc/header.rb', line 19
def author
words.as(:first_name) >> str(",") >>
space? >> words.as(:last_name) >>
space? >> str("<") >> email.as(:email) >> str(">") >> newline
end
|
9
10
11
12
13
|
# File 'lib/coradoc/parser/asciidoc/header.rb', line 9
def
>>
author.maybe.as(:author) >>
revision.maybe.as(:revision) >> newline.maybe
end
|
15
16
17
|
# File 'lib/coradoc/parser/asciidoc/header.rb', line 15
def
match("=") >> space? >> text.as(:title) >> newline
end
|
#revision ⇒ Object
25
26
27
28
29
|
# File 'lib/coradoc/parser/asciidoc/header.rb', line 25
def revision
(word >> (str(".") >> word).maybe).as(:number) >>
str(",") >> space? >> date.as(:date ) >> str(":") >>
space? >> words.as(:remark) >> newline
end
|