PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/plugins/paranoid.rb

https://github.com/Epictetus/termtter
Ruby | 11 lines | 10 code | 0 blank | 1 comment | 0 complexity | 9492b9dba07f3209e21bffb6a31c2946 MD5 | raw file
  1. # -*- coding: utf-8 -*-
  2. module Termtter::Client
  3. register_command(
  4. :paranoid,
  5. :help => ['paranoid message', 'Something like `update`'],
  6. :alias => :pd) do |arg|
  7. str = arg.gsub(/\w+/, '@\0').gsub(/\#@/, '#')
  8. result = Termtter::API.twitter.update(str)
  9. puts "paranoid'ed=> " << result.text
  10. end
  11. end