Class: Coradoc::Element::Inline::Anchor
- Inherits:
-
Object
- Object
- Coradoc::Element::Inline::Anchor
- Defined in:
- lib/coradoc/element/inline/anchor.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ Anchor
constructor
A new instance of Anchor.
- #to_adoc ⇒ Object
Constructor Details
#initialize(id) ⇒ Anchor
Returns a new instance of Anchor.
7 8 9 |
# File 'lib/coradoc/element/inline/anchor.rb', line 7 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
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
11 12 13 |
# File 'lib/coradoc/element/inline/anchor.rb', line 11 def to_adoc "[[#{@id}]]" end |