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.



233
234
235
236
# File 'lib/facwparser/element.rb', line 233

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

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



232
233
234
# File 'lib/facwparser/element.rb', line 232

def text
  @text
end

Instance Method Details

#==(other) ⇒ Object



237
238
239
# File 'lib/facwparser/element.rb', line 237

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