Method: RODF::Span#initialize

Defined in:
lib/rodf/span.rb

#initialize(first, second = nil) ⇒ Span

Returns a new instance of Span.



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/rodf/span.rb', line 18

def initialize(first, second = nil)
  super

  @style = nil

  if first.instance_of?(Symbol)
    @style = first
    content_parts << TextNode.new(second) unless second.nil?
  else
    content_parts << TextNode.new(first)
  end
end