Class: Topsy::Trend

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Trend

Returns a new instance of Trend.



18
19
20
21
22
# File 'lib/rtopsy/trend.rb', line 18

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

Instance Attribute Details

#termObject

Returns the value of attribute term.



12
13
14
# File 'lib/rtopsy/trend.rb', line 12

def term
  @term
end

#urlObject

Returns the value of attribute url.



12
13
14
# File 'lib/rtopsy/trend.rb', line 12

def url
  @url
end

Instance Method Details

#to_sObject



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

def to_s
  "Topsy Trend: #{term}"
end