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