Class: Jekyll::Converters::CookWare
- Defined in:
- lib/jekyll/converters/cooklang.rb
Instance Method Summary collapse
-
#initialize(quantity, name) ⇒ CookWare
constructor
A new instance of CookWare.
- #to_html ⇒ Object
Methods inherited from ToHTML
Constructor Details
#initialize(quantity, name) ⇒ CookWare
Returns a new instance of CookWare.
48 49 50 51 |
# File 'lib/jekyll/converters/cooklang.rb', line 48 def initialize(quantity, name) @name = name.to_s @quantity = quantity.to_s end |
Instance Method Details
#to_html ⇒ Object
53 54 55 56 |
# File 'lib/jekyll/converters/cooklang.rb', line 53 def to_html return @name.to_s if @quantity.empty? "<em>#{@quantity}</em> #{@name}" end |