Class: Shareable::Helpers::Tumblr

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:


125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/shareable/helpers/tags.rb', line 125

def to_s(locals={}) #:nodoc:
  locals[:options] ||= {}
  p_opts = {:description => CGI::escape(@options[:options][:description]),
            :url => CGI::escape(@options[:options][:url]),
            :title => CGI::escape(@options[:options][:title])}
  locals[:options].merge!(@options[:options].merge(p_opts))
  if @options[:tumblr]
    @options[:tumblr][:description] = CGI::escape(@options[:tumblr][:description]) if @options[:tumblr][:description]
    @options[:tumblr][:url] = CGI::escape(@options[:tumblr][:url]) if @options[:tumblr][:url]
    @options[:tumblr][:title] = CGI::escape(@options[:tumblr][:title]) if @options[:tumblr][:title]
  end
  super locals, "Tumblr"
end