Class: JekyllSupport::JekyllTagNoArgParsing

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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.



7
8
9
10
11
12
13
14
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 7

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 Attribute Details

#argument_stringObject (readonly)

Returns the value of attribute argument_string.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def argument_string
  @argument_string
end

#helperObject (readonly)

Returns the value of attribute helper.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def helper
  @helper
end

#line_numberObject (readonly)

Returns the value of attribute line_number.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def line_number
  @line_number
end

#loggerObject (readonly)

Returns the value of attribute logger.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def logger
  @logger
end

#pageObject (readonly)

Returns the value of attribute page.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def page
  @page
end

#siteObject (readonly)

Returns the value of attribute site.



5
6
7
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 5

def site
  @site
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


19
20
21
# File 'lib/tag/jekyll_plugin_support_tag_noarg.rb', line 19

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