Class: Middleman::Emojifire::Converter
- Inherits:
-
Object
- Object
- Middleman::Emojifire::Converter
- Defined in:
- lib/middleman-emojifire/converter.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(content) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
7 8 9 |
# File 'lib/middleman-emojifire/converter.rb', line 7 def content @content end |
Instance Method Details
#convert ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/middleman-emojifire/converter.rb', line 15 def convert if content.include_body? content.body_only { |body| emojify(body) } else emojify(content.to_s) end end |