Class: Ayadn::Search
Instance Method Summary collapse
- #find(words, options) ⇒ Object
- #hashtag(hashtag, options) ⇒ Object
-
#initialize(api, view, workers) ⇒ Search
constructor
A new instance of Search.
Constructor Details
Instance Method Details
#find(words, options) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/ayadn/search.rb', line 28 def find(words, ) Settings.global[:force] = true if [:force] @view.downloading() stream = get_stream(words, ) @check.no_data(stream, 'search') if [:users] get_users(stream, ) elsif [:channels] get_channels(stream, ) else get_generic(stream, words, ) end if Settings.[:timeline][:compact] == true && ![:raw] puts "\n" end end |
#hashtag(hashtag, options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ayadn/search.rb', line 13 def hashtag(hashtag, ) Settings.global[:force] = true if [:force] @view.downloading() stream = @api.get_hashtag(hashtag) @check.no_data(stream, 'hashtag') if [:extract] @view.all_hashtag_links(stream, hashtag) else @view.render(stream, ) if Settings.[:timeline][:compact] == true && ![:raw] puts "\n" end end end |