Updating documentation for LiquidTagBase (#15933)
In addition adding a Rubocop auto-update.
This commit is contained in:
parent
bb17094e6b
commit
72b89aa57c
1 changed files with 14 additions and 1 deletions
|
|
@ -1,3 +1,16 @@
|
|||
# @abstract
|
||||
#
|
||||
# We created this class as a wrapper to `Liquid::Tag`. This follows
|
||||
# Forem's aspirational architectural decision to create
|
||||
# wrapping/insulating classes around our gem dependencies.
|
||||
#
|
||||
# This pattern is analogous to creating ApplicationRecord models that
|
||||
# inherit from ActiveRecord::Base.
|
||||
#
|
||||
# @note When making a new Liquid tag, inherit from this class instead
|
||||
# of `Liquid::Base`.
|
||||
#
|
||||
# @see https://github.com/Shopify/liquid
|
||||
class LiquidTagBase < Liquid::Tag
|
||||
# The method name to send the user to ask whether or not they
|
||||
# have access to the given liquid tag.
|
||||
|
|
@ -47,7 +60,7 @@ class LiquidTagBase < Liquid::Tag
|
|||
private
|
||||
|
||||
def validate_contexts
|
||||
return unless self.class.const_defined? "VALID_CONTEXTS"
|
||||
return unless self.class.const_defined? :VALID_CONTEXTS
|
||||
|
||||
source = parse_context.partial_options[:source]
|
||||
raise LiquidTags::Errors::InvalidParseContext, "No source found" unless source
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue