class Inkcite::Renderer::Social::Twitter

Public Class Methods

new() click to toggle source
Calls superclass method Inkcite::Renderer::Social::new
# File lib/inkcite/renderer/social.rb, line 39
def initialize
  super(:src => 'twitter.png', :alt => 'Twitter', :cta => 'Tweet', :scale => 81 / 100.0)
end

Protected Instance Methods

get_share_href(url, text, opts, ctx) click to toggle source
# File lib/inkcite/renderer/social.rb, line 45
def get_share_href url, text, opts, ctx

  params = {}
  params[:url] = url unless url.blank?
  params[:text] = text
  params[:hashtags] = opts[:hashtags]

  val = "https://twitter.com/intent/tweet?"
  val << Renderer.join_hash(params, '=', '&')
  val
end