Class: Polites::Span::Annotation

Inherits:
Polites::Span show all
Defined in:
lib/polites/span/annotation.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#children

Instance Method Summary collapse

Methods inherited from Polites::Span

build

Constructor Details

#initialize(children, text) ⇒ Annotation

Returns a new instance of Annotation.



9
10
11
12
# File 'lib/polites/span/annotation.rb', line 9

def initialize(children, text)
  super(children)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



7
8
9
# File 'lib/polites/span/annotation.rb', line 7

def text
  @text
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/polites/span/annotation.rb', line 14

def eql?(other)
  super && text == other.text
end