Class: Coradoc::Element::Inline::Anchor

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/element/inline/anchor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

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_adocObject



13
14
15
# File 'lib/coradoc/element/inline/anchor.rb', line 13

def to_adoc
  "[[#{@id}]]"
end