Class: AWIS4Ruby::UrlInfo
- Inherits:
-
Object
- Object
- AWIS4Ruby::UrlInfo
- Defined in:
- lib/url_info.rb
Instance Attribute Summary collapse
-
#adult_content ⇒ Object
ContactInfo.
-
#awis_url ⇒ Object
ContactInfo.
-
#contact_address ⇒ Object
ContactInfo.
-
#contact_email ⇒ Object
ContactInfo.
-
#domain_name ⇒ Object
ContactInfo.
-
#full_xml ⇒ Object
ContactInfo.
-
#keywords ⇒ Object
ContactInfo.
-
#language_encoding ⇒ Object
ContactInfo.
-
#language_locale ⇒ Object
ContactInfo.
-
#links_in_count ⇒ Object
ContactInfo.
-
#load_time ⇒ Object
ContactInfo.
-
#online_since ⇒ Object
ContactInfo.
-
#owner_name ⇒ Object
ContactInfo.
-
#phone_numbers ⇒ Object
ContactInfo.
-
#rank ⇒ Object
ContactInfo.
-
#related_links ⇒ Object
ContactInfo.
-
#site_description ⇒ Object
ContactInfo.
-
#site_title ⇒ Object
ContactInfo.
-
#speed_percentile ⇒ Object
ContactInfo.
-
#stock_ticker ⇒ Object
ContactInfo.
Instance Method Summary collapse
-
#initialize ⇒ UrlInfo
constructor
A new instance of UrlInfo.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ UrlInfo
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_content ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def adult_content @adult_content end |
#awis_url ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def awis_url @awis_url end |
#contact_address ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def contact_address @contact_address end |
#contact_email ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def contact_email @contact_email end |
#domain_name ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def domain_name @domain_name end |
#full_xml ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def full_xml @full_xml end |
#keywords ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def keywords @keywords end |
#language_encoding ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def language_encoding @language_encoding end |
#language_locale ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def language_locale @language_locale end |
#links_in_count ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def links_in_count @links_in_count end |
#load_time ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def load_time @load_time end |
#online_since ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def online_since @online_since end |
#owner_name ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def owner_name @owner_name end |
#phone_numbers ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def phone_numbers @phone_numbers end |
#rank ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def rank @rank end |
#related_links ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def @related_links end |
#site_description ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def site_description @site_description end |
#site_title ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def site_title @site_title end |
#speed_percentile ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def speed_percentile @speed_percentile end |
#stock_ticker ⇒ Object
ContactInfo
7 8 9 |
# File 'lib/url_info.rb', line 7 def stock_ticker @stock_ticker end |
Instance Method Details
#to_s ⇒ Object
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 |