Class: AWIS4Ruby::UrlInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/url_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUrlInfo

Returns a new instance of UrlInfo.



19
20
21
22
23
# File 'lib/url_info.rb', line 19

def initialize
  @phone_numbers = []
  @keywords = []
  @related_links = []
end

Instance Attribute Details

#adult_contentObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def adult_content
  @adult_content
end

#awis_urlObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def awis_url
  @awis_url
end

#contact_addressObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def contact_address
  @contact_address
end

#contact_emailObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def contact_email
  @contact_email
end

#domain_nameObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def domain_name
  @domain_name
end

#full_xmlObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def full_xml
  @full_xml
end

#keywordsObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def keywords
  @keywords
end

#language_encodingObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def language_encoding
  @language_encoding
end

#language_localeObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def language_locale
  @language_locale
end

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def links_in_count
  @links_in_count
end

#load_timeObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def load_time
  @load_time
end

#online_sinceObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def online_since
  @online_since
end

#owner_nameObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def owner_name
  @owner_name
end

#phone_numbersObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def phone_numbers
  @phone_numbers
end

#rankObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def rank
  @rank
end

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def related_links
  @related_links
end

#site_descriptionObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def site_description
  @site_description
end

#site_titleObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def site_title
  @site_title
end

#speed_percentileObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def speed_percentile
  @speed_percentile
end

#stock_tickerObject

ContactInfo



7
8
9
# File 'lib/url_info.rb', line 7

def stock_ticker
  @stock_ticker
end

Instance Method Details

#to_sObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/url_info.rb', line 25

def to_s
  str = ''
  self.instance_variables.each do |var_name|
    cur_var = self.send(var_name.gsub('@', ''))        
    if cur_var.kind_of?(Array)
      str += "#{var_name}:\n"
      cur_var.each do |i|
        if i.class == Hash
          i.each do |k,v|
            str += "  #{k}: #{v}\n"
          end   
        else
          str += "  #{i}\n"       
        end
      end          
    else
      if var_name =~ /full_xml/
        str += "#{var_name}: #{cur_var[0..20]}...(abbreviated)\n"
      else
        str += "#{var_name}: #{cur_var}\n" 
      end            
    end        
  end   
  str       
end