Class: Regenerate::TextVariable
- Inherits:
-
PageComponent
- Object
- PageComponent
- Regenerate::TextVariable
- Defined in:
- lib/regenerate/web-page.rb
Overview
Base class for the text variable types
Direct Known Subclasses
Instance Attribute Summary collapse
-
#varName ⇒ Object
readonly
Returns the value of attribute varName.
Attributes inherited from PageComponent
Instance Method Summary collapse
- #addToParentPage ⇒ Object
- #initializeFromStartComment(parsedCommentLine) ⇒ Object
- #textVariableValue ⇒ Object
Methods inherited from PageComponent
#addLine, #finishText, #finished, #initialize, #processEndComment, #processStartComment
Constructor Details
This class inherits a constructor from Regenerate::PageComponent
Instance Attribute Details
#varName ⇒ Object (readonly)
Returns the value of attribute varName.
111 112 113 |
# File 'lib/regenerate/web-page.rb', line 111 def varName @varName end |
Instance Method Details
#addToParentPage ⇒ Object
117 118 119 120 |
# File 'lib/regenerate/web-page.rb', line 117 def addToParentPage #puts "TextVariable.addToParentPage #{@varName} = #{@text.inspect}" @parentPage.setPageObjectInstanceVar(@varName, @text) end |
#initializeFromStartComment(parsedCommentLine) ⇒ Object
113 114 115 |
# File 'lib/regenerate/web-page.rb', line 113 def initializeFromStartComment(parsedCommentLine) @varName = parsedCommentLine.instanceVarName end |
#textVariableValue ⇒ Object
122 123 124 |
# File 'lib/regenerate/web-page.rb', line 122 def textVariableValue @parentPage.getPageObjectInstanceVar(@varName) end |