Class: Hatena::Keyword::Retrieve

Inherits:
Service
  • Object
show all
Defined in:
lib/hatena/keyword.rb

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Hatena::Keyword::Service

Instance Method Details

#executeObject



72
73
74
75
76
77
78
# File 'lib/hatena/keyword.rb', line 72

def execute
  super
  # result: {"wordlist"=>[{"score"=>78, "cname"=>"idol", "word"=>"石村舞波", "refcount"=>4}]}
  result["wordlist"].map do |h|
    Hatena::Keyword.new(h["word"], h["score"], h["cname"], h["refcount"])
  end
end