Class: Sablon::Content::Markdown
- Inherits:
-
Struct
- Object
- Struct
- Sablon::Content::Markdown
show all
- Includes:
- Sablon::Content
- Defined in:
- lib/sablon/content.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
make, register, remove, wrap
Constructor Details
#initialize(markdown) ⇒ Markdown
85
86
87
88
89
90
|
# File 'lib/sablon/content.rb', line 85
def initialize(markdown)
warn "[DEPRECATION] `Sablon::Content::Markdown` is deprecated. Please use `Sablon::Content::HTML` instead."
redcarpet = ::Redcarpet::Markdown.new(::Redcarpet::Render::HTML.new)
word_ml = Sablon.content(:html, redcarpet.render(markdown))
super word_ml
end
|
Instance Attribute Details
#word_ml ⇒ Object
Returns the value of attribute word_ml
80
81
82
|
# File 'lib/sablon/content.rb', line 80
def word_ml
@word_ml
end
|
Class Method Details
.id ⇒ Object
82
|
# File 'lib/sablon/content.rb', line 82
def self.id; :markdown end
|
.wraps?(value) ⇒ Boolean
83
|
# File 'lib/sablon/content.rb', line 83
def self.wraps?(value) false end
|
Instance Method Details
#append_to(*args) ⇒ Object
92
93
94
|
# File 'lib/sablon/content.rb', line 92
def append_to(*args)
word_ml.append_to(*args)
end
|