Class: ComfortableMexicanSofa::Tag::Snippet

Inherits:
Object
  • Object
show all
Includes:
ComfortableMexicanSofa::Tag
Defined in:
lib/comfortable_mexican_sofa/tags/snippet.rb

Constant Summary

Constants included from ComfortableMexicanSofa::Tag

TOKENIZER_REGEX

Instance Attribute Summary

Attributes included from ComfortableMexicanSofa::Tag

#label, #page, #params, #parent

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.regex_tag_signature(label = nil) ⇒ Object



4
5
6
7
# File 'lib/comfortable_mexican_sofa/tags/snippet.rb', line 4

def self.regex_tag_signature(label = nil)
  label ||= /[\w\-]+/
  /\{\{\s*cms:snippet:(#{label})\s*\}\}/
end

Instance Method Details

#contentObject



9
10
11
# File 'lib/comfortable_mexican_sofa/tags/snippet.rb', line 9

def content
  snippet.content
end