Class: Pry::SendTweet::BaseCommand

Inherits:
ClassCommand
  • Object
show all
Includes:
PagingSupport, TweetRenderer, UserRenderer
Defined in:
lib/pry/send_tweet/commands/base_command.rb

Direct Known Subclasses

ReadTweets, SendTweet, TwitterAction, TwitterSearch

Constant Summary

Constants included from TimeAgoInWords

TimeAgoInWords::VERSION

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PagingSupport

#page, #page_error, #page_ok

Methods included from UserRenderer

#render_user

Methods included from TweetRenderer

#render_tweets

Methods included from TimeAgoInWords

time_ago_in_words

Class Method Details

.inherited(kls) ⇒ Object



12
13
14
# File 'lib/pry/send_tweet/commands/base_command.rb', line 12

def self.inherited(kls)
  kls.group 'Twitter'
end

Instance Method Details

#process(*args) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/pry/send_tweet/commands/base_command.rb', line 16

def process(*args)
  if nil == _pry_.config.twitter
    raise Pry::CommandError, "_pry_.config.twitter is nil!\n" \
                             "Please set the required keys and tokens to send " \
                             "tweets using Twitters API. \n" \
                             "Visit https://gitlab/trebor8/fry-send_tweet.rb to learn how."
  end
end