Class: Topsy::Author

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Author

Returns a new instance of Author.



24
25
26
27
28
# File 'lib/rtopsy/author.rb', line 24

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

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def description
  @description
end

#hitsObject

Returns the value of attribute hits.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def hits
  @hits
end

#influence_levelObject

Returns the value of attribute influence_level.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def influence_level
  @influence_level
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def name
  @name
end

#nickObject

Returns the value of attribute nick.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def nick
  @nick
end

#topsy_author_urlObject

Returns the value of attribute topsy_author_url.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def topsy_author_url
  @topsy_author_url
end

#typeObject

Returns the value of attribute type.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def type
  @type
end

#urlObject

Returns the value of attribute url.



18
19
20
# File 'lib/rtopsy/author.rb', line 18

def url
  @url
end

Instance Method Details

#to_sObject



20
21
22
# File 'lib/rtopsy/author.rb', line 20

def to_s
  "Topsy Author: #{name}, @#{nick}, #{topsy_author_url}"
end