Class: Topsy::Trend
- Inherits:
-
Object
- Object
- Topsy::Trend
- Defined in:
- lib/rtopsy/trend.rb
Instance Attribute Summary collapse
-
#term ⇒ Object
Returns the value of attribute term.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Trend
constructor
A new instance of Trend.
- #to_s ⇒ Object
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
#term ⇒ Object
Returns the value of attribute term.
12 13 14 |
# File 'lib/rtopsy/trend.rb', line 12 def term @term end |
#url ⇒ Object
Returns the value of attribute url.
12 13 14 |
# File 'lib/rtopsy/trend.rb', line 12 def url @url end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/rtopsy/trend.rb', line 14 def to_s "Topsy Trend: #{term}" end |