Class: Pry::SendTweet::TwitterSearch
- Inherits:
-
BaseCommand
- Object
- ClassCommand
- BaseCommand
- Pry::SendTweet::TwitterSearch
show all
- Defined in:
- lib/pry/send_tweet/commands/twitter_search.rb
Constant Summary
TimeAgoInWords::VERSION
Instance Method Summary
collapse
Methods inherited from BaseCommand
inherited
#page, #page_error, #page_ok
#render_user
#render_tweets
time_ago_in_words
Instance Method Details
#options(o) ⇒ Object
11
12
13
14
|
# File 'lib/pry/send_tweet/commands/twitter_search.rb', line 11
def options(o)
o.on 'c=', 'count=', "The number of tweets to show. Default is " \
"#{default_read_size}."
end
|
#process(query) ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/pry/send_tweet/commands/twitter_search.rb', line 16
def process(query)
super
= filter .search(query, search_options).to_a
if .empty?
page "No results to show."
else
q = bright_blue(bold(query))
(, title: format("Showing search results for %{q}", q: q))
end
end
|