Class: Twat::Subcommands::FollowTag

Inherits:
Base
  • Object
show all
Includes:
FollowMixin
Defined in:
lib/twat/subcommands/follow_tag.rb

Constant Summary

Constants included from FollowMixin

FollowMixin::POLLING_RESOLUTION

Instance Attribute Summary

Attributes inherited from Base

#opts

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FollowMixin

#run, #untested

Methods inherited from Base

#args, #auth!, #beep, #config, #deentitize, #enable_readline!, #format, #initialize, #needs_arguments, #needs_at_least, #pad, #reader, #run!, #usage, #usage_and_exit!

Methods included from Exceptions

#with_handled_exceptions

Constructor Details

This class inherits a constructor from Twat::Subcommands::Base

Class Method Details

.usageObject



5
6
7
8
# File 'lib/twat/subcommands/follow_tag.rb', line 5

def self.usage
  ["Usage: twat",
    "Usage: twat follow_stream #hashtag"]
end

Instance Method Details

#new_tweets(opts) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/twat/subcommands/follow_tag.rb', line 10

def new_tweets(opts)
  unless @argv.empty?
    ret = Twitter.search(@argv.join(" "), opts).results
  else
    ret = Twitter.home_timeline(opts)
  end
end