Class: Mdtoc::Markdown::HeaderWithFragment
- Defined in:
- lib/mdtoc/markdown/header.rb
Instance Method Summary collapse
-
#initialize(depth, label, url) ⇒ HeaderWithFragment
constructor
A new instance of HeaderWithFragment.
Methods inherited from Header
Constructor Details
#initialize(depth, label, url) ⇒ HeaderWithFragment
Returns a new instance of HeaderWithFragment.
43 44 45 46 |
# File 'lib/mdtoc/markdown/header.rb', line 43 def initialize(depth, label, url) super @url += "##{@label.downcase.tr(" ", "-").gsub(/[^\w\-]/, "")}" end |