Class: Topsy::Stats

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Stats

Returns a new instance of Stats.



20
21
22
23
24
# File 'lib/rtopsy/stats.rb', line 20

def initialize(hash)
  hash.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#allObject

Returns the value of attribute all.



14
15
16
# File 'lib/rtopsy/stats.rb', line 14

def all
  @all
end

#containsObject

Returns the value of attribute contains.



14
15
16
# File 'lib/rtopsy/stats.rb', line 14

def contains
  @contains
end

#influentialObject

Returns the value of attribute influential.



14
15
16
# File 'lib/rtopsy/stats.rb', line 14

def influential
  @influential
end

#topsy_trackback_urlObject

Returns the value of attribute topsy_trackback_url.



14
15
16
# File 'lib/rtopsy/stats.rb', line 14

def topsy_trackback_url
  @topsy_trackback_url
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/rtopsy/stats.rb', line 16

def to_s
  "Topsy Stats: #{topsy_trackback_url}"
end