Class: IsoDoc::XrefGen::Anchor::SeenAnchor

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/isodoc/xref/xref_anchor.rb

Instance Method Summary collapse

Constructor Details

#initializeSeenAnchor

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