Class: SocialButtons::GooglePlus::AsyncScripter

Inherits:
Scripter
  • Object
show all
Defined in:
lib/social_buttons/view_helpers/google_plus.rb

Instance Attribute Summary

Attributes inherited from Scripter

#caller, #options

Instance Method Summary collapse

Methods inherited from Scripter

#initialize

Constructor Details

This class inherits a constructor from SocialButtons::Scripter

Instance Method Details

#language(lang = nil) ⇒ Object



74
75
76
# File 'lib/social_buttons/view_helpers/google_plus.rb', line 74

def language lang = nil
  "{lang: '#{lang}'}" if lang
end

#script(lang = nil) ⇒ Object

Place this tag in your head or just before your close body tag



68
69
70
71
72
# File 'lib/social_buttons/view_helpers/google_plus.rb', line 68

def script lang = nil
  ['<script type="text/javascript" src="https://apis.google.com/js/plusone.js">',
    "#{language lang}",
  '</script>'].join.html_safe
end