Class: Octopress::Social::GooglePlus::Tag

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

Instance Method Summary collapse

Constructor Details

#initialize(tag, input, tokens) ⇒ Tag

Returns a new instance of Tag.



101
102
103
104
# File 'lib/octopress-social/google-plus.rb', line 101

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

Instance Method Details

#render(context) ⇒ Object



106
107
108
109
110
111
112
# File 'lib/octopress-social/google-plus.rb', line 106

def render(context)
  item = Octopress::Social.item(context, @input)
  site = context['site']

  Octopress::Social::GooglePlus.config(site)
  Octopress::Social::GooglePlus.send(@tag, site, item).gsub(/(\s{2,}|\n)/, ' ').strip
end