Class: JekyllSupport::JekyllBlockNoArgParsing
- Inherits:
-
JekyllBlock
- Object
- Liquid::Block
- JekyllBlock
- JekyllSupport::JekyllBlockNoArgParsing
- Includes:
- JekyllSupportError
- Defined in:
- lib/jekyll_plugin_support.rb,
lib/block/jekyll_plugin_support_block_noarg.rb
Instance Attribute Summary collapse
-
#argument_string ⇒ Object
readonly
Returns the value of attribute argument_string.
-
#helper ⇒ Object
readonly
Returns the value of attribute helper.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Attributes inherited from JekyllBlock
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 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.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 7 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 Attribute Details
#argument_string ⇒ Object (readonly)
Returns the value of attribute argument_string.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def argument_string @argument_string end |
#helper ⇒ Object (readonly)
Returns the value of attribute helper.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def helper @helper end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def line_number @line_number end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def logger @logger end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def page @page end |
#site ⇒ Object (readonly)
Returns the value of attribute site.
5 6 7 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 5 def site @site end |
Instance Method Details
#blank? ⇒ Boolean
Liquid::Block subclasses do not render if there is no content within the tag This override fixes that
22 23 24 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 22 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
29 30 31 |
# File 'lib/block/jekyll_plugin_support_block_noarg.rb', line 29 def render_impl abort "#{self.class}.render_impl for tag #{@tag_name} must be overridden, but it was not." end |