Class: IsoDoc::XrefGen::Anchor::SeenAnchor
- Inherits:
-
Object
- Object
- IsoDoc::XrefGen::Anchor::SeenAnchor
- Includes:
- Singleton
- Defined in:
- lib/isodoc/xref/xref_anchor.rb
Instance Method Summary collapse
- #add(elem) ⇒ Object
-
#initialize ⇒ SeenAnchor
constructor
A new instance of SeenAnchor.
- #seen(elem) ⇒ Object
Constructor Details
#initialize ⇒ SeenAnchor
Returns a new instance of SeenAnchor.
9 10 11 |
# File 'lib/isodoc/xref/xref_anchor.rb', line 9 def initialize @seen = {} end |
Instance Method Details
#add(elem) ⇒ Object
17 18 19 |
# File 'lib/isodoc/xref/xref_anchor.rb', line 17 def add(elem) @seen[elem] = true end |
#seen(elem) ⇒ Object
13 14 15 |
# File 'lib/isodoc/xref/xref_anchor.rb', line 13 def seen(elem) @seen.has_key?(elem) end |