class Verification

Attributes

user_name[RW]

Public Class Methods

new(user_name) click to toggle source
# File lib/twiterator/verification.rb, line 4
def initialize(user_name)
  @user_name = user_name.gsub(' ', '%20')
end

Public Instance Methods

verify() click to toggle source
# File lib/twiterator/verification.rb, line 8
def verify
  html = open("https://twitter.com/#{self.user_name}")
  rescue OpenURI::HTTPError => error
  response = error.io
  if !response.status.include?("404" || "Not Found")
    true
  else
    false
  end
end