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.
78 79 80 81 82 83 84 |
# File 'pre.rb', line 78 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
86 87 88 |
# File 'pre.rb', line 86 def render(_) "<span class='unselectable'>#{@content}</span>" end |