Class: Coradoc::Element::Inline::Anchor
- Defined in:
- lib/coradoc/element/inline/anchor.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ Anchor
constructor
A new instance of Anchor.
- #to_adoc ⇒ Object
Methods inherited from Base
#children_accessors, children_accessors, declare_children, #simplify_block_content, visit, #visit
Constructor Details
#initialize(id) ⇒ Anchor
Returns a new instance of Anchor.
9 10 11 |
# File 'lib/coradoc/element/inline/anchor.rb', line 9 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/coradoc/element/inline/anchor.rb', line 5 def id @id end |
Instance Method Details
#to_adoc ⇒ Object
13 14 15 |
# File 'lib/coradoc/element/inline/anchor.rb', line 13 def to_adoc "[[#{@id}]]" end |