public final class RubyTemplatePrinter extends java.lang.Object implements TemplatePrinter
RubyTemplatePrinter
class prints data of template into a ruby file.Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
RUBY_KEYWORDS |
static java.lang.String |
RUBY_TAB |
Constructor and Description |
---|
RubyTemplatePrinter(java.lang.String templateName,
java.lang.String modelName,
java.lang.String baseTemplateName,
java.lang.String baseTemplatePath)
Constructs a ruby printer with the specified template name.
|
RubyTemplatePrinter(java.lang.String templateName,
java.lang.String modelName,
java.lang.String baseTemplateName,
java.lang.String baseTemplatePath,
java.lang.String outputDirectory)
Constructs a ruby printer with the specified template name.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlignedText(java.lang.String addText)
Adds the aligned (in accordance of the text structure) text to template file.
|
void |
addComment(java.lang.String addText)
Adds the comment to template file.
|
void |
addDataRegion()
Adds the data region to template file.
|
void |
addHeader()
Adds a header to template file.
|
void |
addOperation(java.lang.String operation)
Adds the operation to template file.
|
void |
addOperation(java.lang.String opName,
java.lang.String opArguments)
Adds the operation to template file.
|
void |
addString(java.lang.String addString)
Adds the string to template file.
|
void |
addText(java.lang.String addText)
Adds the text to template file.
|
void |
closeBlock()
Closes the block in template file.
|
void |
closeSequence(java.lang.String addText)
Closes the sequence in template file.
|
java.lang.String |
formattingOperation(java.lang.String operationName)
Checks for a match with the keywords and returns not a keyword for the printer with the same
value.
|
java.lang.String |
getDataLabel()
Returns the data region label of the template file.
|
void |
startBlock()
Opens the block in template file.
|
void |
startSequence(java.lang.String addText)
Opens the sequence in template file.
|
void |
templateBegin()
Adds a title to template file.
|
void |
templateClose()
Closes the template file.
|
void |
templateEnd()
Adds end title for template.
|
public static final java.lang.String[] RUBY_KEYWORDS
public static final java.lang.String RUBY_TAB
public RubyTemplatePrinter(java.lang.String templateName, java.lang.String modelName, java.lang.String baseTemplateName, java.lang.String baseTemplatePath, java.lang.String outputDirectory)
templateName
- the template name.modelName
- the model name.baseTemplateName
- the base template name.baseTemplatePath
- the base template path.outputDirectory
- the output directory for template file.public RubyTemplatePrinter(java.lang.String templateName, java.lang.String modelName, java.lang.String baseTemplateName, java.lang.String baseTemplatePath)
templateName
- the template name.modelName
- the model name.baseTemplateName
- the base template name.baseTemplatePath
- the base template path.public java.lang.String formattingOperation(java.lang.String operationName)
TemplatePrinter
formattingOperation
in interface TemplatePrinter
operationName
- name of the operation.public void templateBegin()
TemplatePrinter
templateBegin
in interface TemplatePrinter
public void addHeader()
TemplatePrinter
addHeader
in interface TemplatePrinter
public void addDataRegion()
TemplatePrinter
addDataRegion
in interface TemplatePrinter
public java.lang.String getDataLabel()
TemplatePrinter
getDataLabel
in interface TemplatePrinter
public void addOperation(java.lang.String operation)
operation
- Operation syntax.public void addOperation(java.lang.String opName, java.lang.String opArguments)
TemplatePrinter
addOperation
in interface TemplatePrinter
opName
- Operation name.opArguments
- Operation arguments.public void addString(java.lang.String addString)
TemplatePrinter
addString
in interface TemplatePrinter
addString
- string.public void addText(java.lang.String addText)
TemplatePrinter
addText
in interface TemplatePrinter
addText
- text.public void addAlignedText(java.lang.String addText)
TemplatePrinter
addAlignedText
in interface TemplatePrinter
addText
- text.public void addComment(java.lang.String addText)
TemplatePrinter
addComment
in interface TemplatePrinter
addText
- text.public void templateEnd()
TemplatePrinter
templateEnd
in interface TemplatePrinter
public void templateClose()
TemplatePrinter
templateClose
in interface TemplatePrinter
public void startSequence(java.lang.String addText)
TemplatePrinter
startSequence
in interface TemplatePrinter
addText
- sequence title.public void closeSequence(java.lang.String addText)
TemplatePrinter
closeSequence
in interface TemplatePrinter
addText
- sequence end title.public void startBlock()
TemplatePrinter
startBlock
in interface TemplatePrinter
public void closeBlock()
TemplatePrinter
closeBlock
in interface TemplatePrinter