Class: PreTag::UnselectableTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- PreTag::UnselectableTag
- Defined in:
- pre.rb
Overview
"""{% noselect %} or {% noselect this all gets copied. Also, space before the closing percent is signficant %}"""
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ UnselectableTag
constructor
A new instance of UnselectableTag.
- #render(_) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ UnselectableTag
Returns a new instance of UnselectableTag.
54 55 56 57 58 59 60 |
# File 'pre.rb', line 54 def initialize(tag_name, text, tokens) super(tag_name, text, tokens) @content = text # puts "UnselectableTag: content1= '#{@content}'" @content = '$ ' if @content.nil? || @content.empty? # puts "UnselectableTag: content2= '#{@content}'" end |
Instance Method Details
#render(_) ⇒ Object
62 63 64 |
# File 'pre.rb', line 62 def render(_) "<span class='unselectable'>#{@content}</span>" end |