class Twittbot::CLI
Public Instance Methods
add_admin(user_name)
click to toggle source
# File lib/twittbot/cli.rb, line 52 def add_admin(user_name) require 'twittbot/bot' bot = Twittbot::Bot.new bot.modify_admin(user_name, :add) end
auth()
click to toggle source
# File lib/twittbot/cli.rb, line 16 def auth require 'twittbot/bot' bot = Twittbot::Bot.new bot.auth end
cron(task_name)
click to toggle source
# File lib/twittbot/cli.rb, line 31 def cron(task_name) require 'twittbot/bot' bot = Twittbot::Bot.new(save_config: false) bot.cron(task_name.downcase.to_sym) end
del_admin(user_name)
click to toggle source
# File lib/twittbot/cli.rb, line 59 def del_admin(user_name) require 'twittbot/bot' bot = Twittbot::Bot.new bot.modify_admin(user_name, :delete) end
generate(template_name)
click to toggle source
# File lib/twittbot/cli.rb, line 38 def generate(template_name) require 'twittbot/generators/templates/template_generator' generator = Twittbot::Generators::TemplateGenerator.new template_name, options generator.create end
list_templates()
click to toggle source
# File lib/twittbot/cli.rb, line 45 def list_templates require 'twittbot/template_lister' lister = Twittbot::TemplateLister.new options lister.list end
new(app_name)
click to toggle source
# File lib/twittbot/cli.rb, line 9 def new(app_name) require 'twittbot/generators/twittbot/app/app_generator' generator = Twittbot::Generators::AppGenerator.new app_name, options generator.create end
start()
click to toggle source
# File lib/twittbot/cli.rb, line 24 def start require 'twittbot/bot' bot = Twittbot::Bot.new(options) bot.start end