Why did I write my own block method?

This commit is contained in:
Joel McCoy
2015-01-08 13:59:32 -05:00
parent bb22671630
commit 094ff69ec3

View File

@@ -134,14 +134,8 @@ class Ebooks::Boodoo::BoodooBot < Ebooks::Bot
@archive = Archive.new(@original, @archive_path, make_client).sync @archive = Archive.new(@original, @archive_path, make_client).sync
end end
def block(targets) def block(*args)
if targets.kind_of? String twitter.block(*args)
targets = parse_array(targets)
end
targets.each do |target|
log "Blocking @#{target}"
Twitter::REST::Request.new(@twitter, :post, "1.1/blocks/create.json", {:screen_name => target}).perform
end
end end
def make_model! def make_model!