Class: Facwparser::Element::InlineElementBase

Inherits:
ElementBase
  • Object
show all
Defined in:
lib/facwparser/element.rb

Direct Known Subclasses

A, Br, Emphasis, Image, Monospace, Q, Strike, Strong, Sub, Sup, Text, Under

Instance Attribute Summary collapse

Attributes inherited from ElementBase

#children, #source

Instance Method Summary collapse

Methods inherited from ElementBase

#render_html, #render_text

Constructor Details

#initialize(source, text) ⇒ InlineElementBase

Returns a new instance of InlineElementBase.



226
227
228
229
# File 'lib/facwparser/element.rb', line 226

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

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



225
226
227
# File 'lib/facwparser/element.rb', line 225

def text
  @text
end

Instance Method Details

#==(other) ⇒ Object



230
231
232
# File 'lib/facwparser/element.rb', line 230

def ==(other)
  super(other) && self.text == other.text
end