Class: Tagometer::Summary

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, client = Client.new) ⇒ Summary

Returns a new instance of Summary.



5
6
7
8
9
10
# File 'lib/tagometer/summary.rb', line 5

def initialize(url, client=Client.new)
  @url = url
  @client = client 
  @md5_url = create_md5_url(url) 
  populate
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/tagometer/summary.rb', line 3

def client
  @client
end

#md5_urlObject (readonly)

Returns the value of attribute md5_url.



3
4
5
# File 'lib/tagometer/summary.rb', line 3

def md5_url
  @md5_url
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/tagometer/summary.rb', line 3

def url
  @url
end

Instance Method Details

#titleObject



12
13
14
# File 'lib/tagometer/summary.rb', line 12

def title
 @title || ''
end

#top_tagsObject



20
21
22
# File 'lib/tagometer/summary.rb', line 20

def top_tags
 @top_tags || {}
end

#total_postsObject



16
17
18
# File 'lib/tagometer/summary.rb', line 16

def total_posts
 @total_posts || 0
end