Class: Octopress::Social::GitHub::Tag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/octopress-social/github.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag, input, tokens) ⇒ Tag

Returns a new instance of Tag.



51
52
53
54
# File 'lib/octopress-social/github.rb', line 51

def initialize(tag, input, tokens)
  @tag = tag.strip
  @input = input.strip
end

Instance Method Details

#render(context) ⇒ Object



56
57
58
59
# File 'lib/octopress-social/github.rb', line 56

def render(context)
  Octopress::Social::GitHub.set_config(context['site'])
  Octopress::Social::GitHub.send(@tag).gsub(/(\s{2,}|\n)/, ' ').strip
end