Class: OpenxmlDocxTemplater::Line
- Inherits:
-
Object
- Object
- OpenxmlDocxTemplater::Line
- Defined in:
- lib/openxml_docx_templater/line.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text) ⇒ Line
constructor
A new instance of Line.
- #to_s ⇒ Object
Constructor Details
#initialize(text) ⇒ Line
Returns a new instance of Line.
7 8 9 |
# File 'lib/openxml_docx_templater/line.rb', line 7 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/openxml_docx_templater/line.rb', line 5 def text @text end |
Class Method Details
.code(txt) ⇒ Object
19 20 21 |
# File 'lib/openxml_docx_templater/line.rb', line 19 def self.code(txt) CodeLine.new txt end |
.literal(txt) ⇒ Object
27 28 29 |
# File 'lib/openxml_docx_templater/line.rb', line 27 def self.literal(txt) LiteralLine.new txt end |
.string(txt) ⇒ Object
23 24 25 |
# File 'lib/openxml_docx_templater/line.rb', line 23 def self.string(txt) StringLine.new(txt) end |
.text(txt) ⇒ Object
15 16 17 |
# File 'lib/openxml_docx_templater/line.rb', line 15 def self.text(txt) TextLine.new txt end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/openxml_docx_templater/line.rb', line 11 def to_s @text end |