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.



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

def register_tags=(value)
  @register_tags = value
end

Class Method Details

.register_tag(name, klass) ⇒ Object



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

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

.register_tags!Object



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

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)


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

def register_tags?
  @register_tags
end