Class: Crown::Hatena::Bookmark::EntryList
- Defined in:
- lib/crown/hatena/bookmark/entrylist.rb
Overview
————————————————————— #
EntryList
はてなブックマークの新着エントリー,または人気エントリー一覧
の各エントリー情報を取得するクラス.
————————————————————— #
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
Class Method Summary collapse
-
.start(options = {}, &block) ⇒ Object
———————————————————– # EntryList.start ———————————————————– #.
Instance Method Summary collapse
-
#get ⇒ Object
———————————————————– # get ———————————————————– #.
-
#initialize(options = {}) ⇒ EntryList
constructor
———————————————————– # initialize ———————————————————– #.
Methods inherited from URIList
#finish, #more?, #proxy_address, #proxy_port, #reset, #start
Constructor Details
#initialize(options = {}) ⇒ EntryList
———————————————————– #
initialize
———————————————————– #
54 55 56 57 |
# File 'lib/crown/hatena/bookmark/entrylist.rb', line 54 def initialize( = {}) super @interval = 30 end |
Instance Attribute Details
#interval ⇒ Object
Returns the value of attribute interval.
49 50 51 |
# File 'lib/crown/hatena/bookmark/entrylist.rb', line 49 def interval @interval end |
Class Method Details
Instance Method Details
#get ⇒ Object
———————————————————– #
get
———————————————————– #
69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/crown/hatena/bookmark/entrylist.rb', line 69 def get() return get_summary(super()) if (!block_given?) while (more?) super().each { |entry| result = Crown::Hatena::Bookmark::Entry.new.summary(entry.uri, { :proxy_address => proxy_address(), :proxy_port => proxy_port() }) yield result if (result != nil) sleep(@interval) } end end |