Class: JekyllSupport::JekyllTagNoArgParsing

Inherits:
JekyllTag
  • Object
show all
Includes:
JekyllSupportError, ToString
Defined in:
lib/jekyll_plugin_support.rb,
lib/tag/jekyll_plugin_support_tag_noarg.rb

Instance Attribute Summary

Attributes included from JekyllSupportError

#logger, #page

Attributes inherited from JekyllTag

#argument_string, #helper, #highlighter_prefix, #highlighter_suffix, #jekyll_version, #line_number, #logger, #page, #raw_content, #site

Instance Method Summary collapse

Methods included from ToString

#to_s

Methods included from JekyllSupportError

#exit_without_stack_trace, #format_error_message, #maybe_reraise_error, #remove_ansi_color, #warn_short_trace

Methods inherited from JekyllTag

#render, #set_error_context

Constructor Details

#initialize(tag_name, argument_string, parse_context) ⇒ JekyllTagNoArgParsing

Returns a new instance of JekyllTagNoArgParsing.



3
4
5
6
7
8
9
10
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 3

def initialize(tag_name, argument_string, parse_context)
  class << self
    include NoArgParsing
  end

  super
  @logger.debug { "#{self.class}: respond_to?(:no_arg_parsing) #{respond_to?(:no_arg_parsing) ? 'yes' : 'no'}." }
end

Instance Method Details

#render_implObject

Jekyll plugins must override this method, not render, so their plugin can be tested more easily The following variables are predefined:

@argument_string, @config, @envs, @helper, @layout, @logger, @mode, @page, @paginator, @site, @tag_name and @theme


15
16
17
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 15

def render_impl
  abort "#{self.class}.render_impl for tag #{@tag_name} must be overridden, but it was not."
end