class SocialShares::Hatebu

Constants

URL

Public Instance Methods

shares!() click to toggle source
# File lib/social_shares/hatebu.rb, line 5
def shares!
  response = get(URL, params: {
    url: checked_url
  })
  # response.body.to_i returns status code instead of body converted to integer
  response.body.empty? ? 0 : response.body.to_f.to_i
end