Permalink
Browse files

style changes

  • Loading branch information...
1 parent a75daa1 commit 69e113505b6cf3a96890f4616f89974a6e24fd96 @riffraff committed Apr 13, 2010
Showing with 6 additions and 8 deletions.
  1. +6 −8 lib/cascaad.rb
View
@@ -3,8 +3,8 @@
class Array
def valid_ids_required
- raise Cascaad::BadRequest if(self.empty?)
- self.each do |id|
+ raise Cascaad::BadRequest if empty?
+ each do |id|
raise Cascaad::BadRequest unless id =~ /[0-9]+/
end
end
@@ -34,13 +34,11 @@ def from(domain)
raise BadRequest if @command.empty?
raise UnsupportedDomain unless domain == 'twitter.com'
- begin
- open(api_url_for(domain)) do |response|
- JSON.parse(response.read)
- end
- rescue OpenURI::HTTPError
- raise Cascaad::BadApiKey
+ open(api_url_for(domain)) do |response|
+ JSON.parse(response.read)
end
+ rescue OpenURI::HTTPError
+ raise Cascaad::BadApiKey
end
private

0 comments on commit 69e1135

Please sign in to comment.