Class: Jekyll::Scholar::CiteDetailsTag

Inherits:
Liquid::Tag
  • Object
show all
Includes:
Utilities
Defined in:
lib/jekyll/scholar/tags/cite_details.rb

Instance Attribute Summary collapse

Attributes included from Utilities

#bibtex_file, #config, #context, #query, #site

Instance Method Summary collapse

Methods included from Utilities

#base_url, #bibliography, #bibtex_options, #bibtex_path, #cite, #cite_details, #cited_references, #content_tag, #details_file_for, #details_link_for, #details_path, #entries, #extend_path, #generate_details?, #link_to, #set_context_to

Constructor Details

#initialize(tag_name, arguments, tokens) ⇒ CiteDetailsTag

Returns a new instance of CiteDetailsTag.



9
10
11
12
13
14
# File 'lib/jekyll/scholar/tags/cite_details.rb', line 9

def initialize(tag_name, arguments, tokens)
  super

  @config = Scholar.defaults.dup
  @key, @text = arguments.strip.split(/\s*,\s*/, 2)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/jekyll/scholar/tags/cite_details.rb', line 7

def key
  @key
end

#textObject (readonly)

Returns the value of attribute text.



7
8
9
# File 'lib/jekyll/scholar/tags/cite_details.rb', line 7

def text
  @text
end

Instance Method Details

#render(context) ⇒ Object



16
17
18
19
# File 'lib/jekyll/scholar/tags/cite_details.rb', line 16

def render(context)
  set_context_to context
  cite_details key, text
end