Class: RubyDocx::Elements::Bookmark
- Inherits:
-
Element
- Object
- Element
- RubyDocx::Elements::Bookmark
show all
- Defined in:
- lib/ruby_docx/elements/bookmark.rb
Instance Attribute Summary collapse
Attributes inherited from Element
#doc, #grid, #node, #style
Instance Method Summary
collapse
Methods inherited from Element
#elements, #initialize, #inspect, #to_xml
Instance Attribute Details
#anchor ⇒ Object
Returns the value of attribute anchor.
3
4
5
|
# File 'lib/ruby_docx/elements/bookmark.rb', line 3
def anchor
@anchor
end
|
Instance Method Details
#element ⇒ Object
5
6
7
|
# File 'lib/ruby_docx/elements/bookmark.rb', line 5
def element
@element ||= @node.children.first
end
|
#replace(an) ⇒ Object
26
27
28
|
# File 'lib/ruby_docx/elements/bookmark.rb', line 26
def replace(an)
self.anchor = an
end
|
#to_html ⇒ Object
30
31
32
33
34
35
36
|
# File 'lib/ruby_docx/elements/bookmark.rb', line 30
def to_html
if self.anchor
"<span name=\"#{self.anchor}\"></span>"
else
""
end
end
|
#to_s ⇒ Object
38
39
40
|
# File 'lib/ruby_docx/elements/bookmark.rb', line 38
def to_s
""
end
|