Class: Topsy::SearchCount

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ SearchCount

Returns a new instance of SearchCount.



22
23
24
25
26
# File 'lib/rtopsy/search_count.rb', line 22

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

Instance Attribute Details

#aObject

Returns the value of attribute a.



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

def a
  @a
end

#dObject

Returns the value of attribute d.



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

def d
  @d
end

#hObject

Returns the value of attribute h.



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

def h
  @h
end

#mObject

Returns the value of attribute m.



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

def m
  @m
end

#wObject

Returns the value of attribute w.



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

def w
  @w
end

Instance Method Details

#to_sObject



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

def to_s
  "Topsy SearchCount: #{all}"
end