Class: JekyllSupport::JekyllBlockNoArgParsing
- Inherits:
-
JekyllBlock
- Object
- Liquid::Block
- JekyllBlock
- JekyllSupport::JekyllBlockNoArgParsing
- Includes:
- JekyllSupportError, ToString
- Defined in:
- lib/jekyll_plugin_support.rb,
lib/block/jekyll_plugin_support_block_noarg.rb
Instance Attribute Summary
Attributes included from JekyllSupportError
Attributes inherited from JekyllBlock
#argument_string, #helper, #highlighter_prefix, #highlighter_suffix, #jekyll_version, #line_number, #logger, #page, #raw_content, #site, #text
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Liquid::Block subclasses do not render if there is no content within the tag This override fixes that.
-
#initialize(tag_name, argument_string, parse_context) ⇒ JekyllBlockNoArgParsing
constructor
A new instance of JekyllBlockNoArgParsing.
-
#render_impl ⇒ Object
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.
Methods included from ToString
Methods included from JekyllSupportError
#exit_without_stack_trace, #format_error_message, #maybe_reraise_error, #remove_ansi_color, #warn_short_trace
Methods inherited from JekyllBlock
Constructor Details
#initialize(tag_name, argument_string, parse_context) ⇒ JekyllBlockNoArgParsing
Returns a new instance of JekyllBlockNoArgParsing.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 3 def initialize(tag_name, argument_string, parse_context) class << self include NoArgParsing end super @logger.debug { "#{self.class}: respond_to?(:o_arg_parsing) #{respond_to?(:no_arg_parsing) ? 'yes' : 'no'}." } rescue StandardError => e e.shorten_backtrace @logger.error { e. } ::JekyllSupport.error_short_trace(@logger, e) end |
Instance Method Details
#blank? ⇒ Boolean
Liquid::Block subclasses do not render if there is no content within the tag This override fixes that
18 19 20 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 18 def blank? false end |
#render_impl ⇒ Object
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
25 26 27 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 25 def render_impl abort "#{self.class}.render_impl for tag #{@tag_name} must be overridden, but it was not." end |