Class: Octopress::Social::GooglePlus::Tag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Octopress::Social::GooglePlus::Tag
- Defined in:
- lib/octopress-social/google-plus.rb
Instance Method Summary collapse
-
#initialize(tag, input, tokens) ⇒ Tag
constructor
A new instance of Tag.
- #render(context) ⇒ Object
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 |