Method: ObjectView::Header#initialize

Defined in:
lib/object_view/header.rb

#initialize(n = nil, text = nil) ⇒ Header

Returns a new instance of Header.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/object_view/header.rb', line 6

def initialize(n = nil, text = nil)
  super()
  @single_line = true
  if (n)
    @tag = "h#{n}"
  else
    @tag = 'header'
  end
  if (text)
    add text
  end
end