Class: Docxtor2::TemplateParser

Inherits:
Object
  • Object
show all
Defined in:
lib/docxtor2/template_parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template) ⇒ TemplateParser

Returns a new instance of TemplateParser.



11
12
13
# File 'lib/docxtor2/template_parser.rb', line 11

def initialize(template)
  @parts = parse(template)
end

Class Method Details

.parse(template) ⇒ Object



5
6
7
8
# File 'lib/docxtor2/template_parser.rb', line 5

def parse(template)
  instance = new(template)
  instance.parts
end

Instance Method Details

#partsObject



15
16
17
# File 'lib/docxtor2/template_parser.rb', line 15

def parts
  @parts
end