Class: Shareable::Helpers::GooglePlus

Inherits:
Socialize show all
Defined in:
lib/shareable/helpers/tags.rb

Instance Method Summary collapse

Methods inherited from Tag

#initialize

Constructor Details

This class inherits a constructor from Shareable::Helpers::Tag

Instance Method Details

#to_s(locals = {}) ⇒ Object

:nodoc:


45
46
47
48
49
50
51
52
53
54
55
# File 'lib/shareable/helpers/tags.rb', line 45

def to_s(locals={}) #:nodoc:
  if (@options[:options][:static_link] && !(@options[:google_plus] && @options[:google_plus][:static_link]==false)) || (@options[:google_plus] && @options[:google_plus][:static_link])
    locals[:options] ||= {}
    p_opts = {:url => CGI::escape(@options[:options][:url])}
    locals[:options].merge!(@options[:options].merge(p_opts))
    if @options[:google_plus]
      @options[:google_plus][:url] = CGI::escape(@options[:google_plus][:url]) if @options[:google_plus][:url]
    end
  end
  super locals, "Google+"
end