Module: ThemeCheck::Tags

Defined in:
lib/theme_check/tags.rb

Defined Under Namespace

Classes: Form, Javascript, Layout, Paginate, Render, Schema, Section, Style, Stylesheet

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.register_tags=(value) ⇒ Object (writeonly)

Sets the attribute register_tags



188
189
190
# File 'lib/theme_check/tags.rb', line 188

def register_tags=(value)
  @register_tags = value
end

Class Method Details

.register_tag(name, klass) ⇒ Object



194
195
196
# File 'lib/theme_check/tags.rb', line 194

def register_tag(name, klass)
  Liquid::Template.register_tag(name, klass)
end

.register_tags!Object



198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/theme_check/tags.rb', line 198

def register_tags!
  return if !register_tags? || (defined?(@registered_tags) && @registered_tags)
  @registered_tags = true
  register_tag('form', Form)
  register_tag('layout', Layout)
  register_tag('render', Render)
  register_tag('paginate', Paginate)
  register_tag('section', Section)
  register_tag('style', Style)
  register_tag('schema', Schema)
  register_tag('javascript', Javascript)
  register_tag('stylesheet', Stylesheet)
end

.register_tags?Boolean



190
191
192
# File 'lib/theme_check/tags.rb', line 190

def register_tags?
  @register_tags
end