Module: ThemeCheck::Tags

Defined in:
lib/theme_check/tags.rb

Defined Under Namespace

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.register_tags=(value) ⇒ Object (writeonly)

Sets the attribute register_tags

Parameters:

  • value

    the value to set the attribute register_tags to.



207
208
209
# File 'lib/theme_check/tags.rb', line 207

def register_tags=(value)
  @register_tags = value
end

Class Method Details

.register_tag(name, klass) ⇒ Object



213
214
215
# File 'lib/theme_check/tags.rb', line 213

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

.register_tags!Object



217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/theme_check/tags.rb', line 217

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('sections', Sections)
  register_tag('style', Style)
  register_tag('schema', Schema)
  register_tag('javascript', Javascript)
  register_tag('stylesheet', Stylesheet)
end

.register_tags?Boolean

Returns:

  • (Boolean)


209
210
211
# File 'lib/theme_check/tags.rb', line 209

def register_tags?
  @register_tags
end