File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,20 @@ def self.included(base)
1414 end
1515
1616 attr_accessor :node
17- delegate :at_xpath , :xpath , :to => :@node
1817
1918 # TODO: Should create a docx object from this
2019 def parent ( type = '*' )
2120 @node . at_xpath ( "./parent::#{ type } " )
2221 end
2322
23+ def at_xpath ( *args )
24+ @node . at_xpath ( *args )
25+ end
26+
27+ def xpath ( *args )
28+ @node . xpath ( *args )
29+ end
30+
2431 # Get parent paragraph of element
2532 def parent_paragraph
2633 Elements ::Containers ::Paragraph . new ( parent ( 'w:p' ) )
@@ -102,4 +109,4 @@ def create_within(element)
102109 end
103110 end
104111 end
105- end
112+ end
Original file line number Diff line number Diff line change @@ -2,16 +2,22 @@ module Docx
22 module Elements
33 class Text
44 include Element
5- delegate :content , :content= , :to => :@node
65
76 def self . tag
87 't'
98 end
109
10+ def content
11+ @node . content
12+ end
13+
14+ def content = ( args )
15+ @node . content = args
16+ end
1117
1218 def initialize ( node )
1319 @node = node
1420 end
1521 end
1622 end
17- end
23+ end
You can’t perform that action at this time.
0 commit comments