Class: Regenerate::PageComponent
- Inherits:
-
Object
- Object
- Regenerate::PageComponent
show all
- Defined in:
- lib/regenerate/web-page.rb
Overview
A component, which includes a sequence of lines which make up the text of that component
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of PageComponent.
13
14
15
16
17
|
# File 'lib/regenerate/web-page.rb', line 13
def initialize
@lines = []
@text = nil @parentPage = nil
end
|
Instance Attribute Details
#parentPage ⇒ Object
Returns the value of attribute parentPage.
11
12
13
|
# File 'lib/regenerate/web-page.rb', line 11
def parentPage
@parentPage
end
|
#text ⇒ Object
Returns the value of attribute text.
10
11
12
|
# File 'lib/regenerate/web-page.rb', line 10
def text
@text
end
|
Instance Method Details
#addLine(line) ⇒ Object
42
43
44
|
# File 'lib/regenerate/web-page.rb', line 42
def addLine(line)
@lines << line
end
|
#addToParentPage ⇒ Object
46
47
48
|
# File 'lib/regenerate/web-page.rb', line 46
def addToParentPage
end
|
#finished ⇒ Object
38
39
40
|
# File 'lib/regenerate/web-page.rb', line 38
def finished
@text != nil
end
|
#finishText ⇒ Object
50
51
52
53
|
# File 'lib/regenerate/web-page.rb', line 50
def finishText
@text = @lines.join("\n")
addToParentPage
end
|
34
35
36
|
# File 'lib/regenerate/web-page.rb', line 34
def ()
end
|
27
28
29
30
31
32
|
# File 'lib/regenerate/web-page.rb', line 27
def ()
finishText
if .name != @startName
raise ParseException.new("Name #{.name.inspect} in end comment doesn't match name #{@startName.inspect} in start comment.")
end
end
|
19
20
21
22
23
24
25
|
# File 'lib/regenerate/web-page.rb', line 19
def ()
@startName = .name
()
if .sectionEnd finishText
end
end
|