Class: Eprayim::Doc
- Inherits:
-
Object
- Object
- Eprayim::Doc
- Defined in:
- lib/eprayim.rb,
lib/eprayim/render/html.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
the origin text before parse.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
- #anchor ⇒ Object
-
#initialize(input) ⇒ Doc
constructor
A new instance of Doc.
- #title ⇒ Object
- #to_html ⇒ Object
Constructor Details
Instance Attribute Details
#input ⇒ Object (readonly)
the origin text before parse
12 13 14 |
# File 'lib/eprayim.rb', line 12 def input @input end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
13 14 15 |
# File 'lib/eprayim.rb', line 13 def parser @parser end |
Instance Method Details
#anchor ⇒ Object
25 26 27 |
# File 'lib/eprayim.rb', line 25 def anchor @anchor ||= @parser.peek_head[1] end |
#title ⇒ Object
21 22 23 |
# File 'lib/eprayim.rb', line 21 def title @title ||= @parser.peek_head[0] end |
#to_html ⇒ Object
36 37 38 |
# File 'lib/eprayim/render/html.rb', line 36 def to_html @html ||= parser.parse().to_html end |