Class: Topsy::Tag
- Inherits:
-
Object
- Object
- Topsy::Tag
- Defined in:
- lib/rtopsy/tag.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Tag
constructor
A new instance of Tag.
- #to_s ⇒ Object
Constructor Details
#initialize(hash) ⇒ Tag
Returns a new instance of Tag.
18 19 20 21 22 |
# File 'lib/rtopsy/tag.rb', line 18 def initialize(hash) hash.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/rtopsy/tag.rb', line 12 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
12 13 14 |
# File 'lib/rtopsy/tag.rb', line 12 def url @url end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/rtopsy/tag.rb', line 14 def to_s "Topsy Tag: #{name}" end |