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

Parameters:

  • value

    the value to set the attribute register_tags to.



173
174
175
# File 'lib/theme_check/tags.rb', line 173

def register_tags=(value)
  @register_tags = value
end

Class Method Details

.register_tag(name, klass) ⇒ Object



179
180
181
# File 'lib/theme_check/tags.rb', line 179

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

.register_tags!Object



183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/theme_check/tags.rb', line 183

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

Returns:

  • (Boolean)


175
176
177
# File 'lib/theme_check/tags.rb', line 175

def register_tags?
  @register_tags
end