Permalink
Browse files

check required constructor parameters

  • Loading branch information...
1 parent 7a3d78d commit b3165bc7ee2ceb3529d6553b909182bd094de122 @romand committed Apr 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/iron_worker_ng/api_client.rb
@@ -21,6 +21,9 @@ def initialize(options = {})
@token = options[:token] || options['token']
@project_id = options[:project_id] || options['project_id']
+ raise "Both iron.io token and project id are required" unless
+ token and project_id
+
@scheme = options[:scheme] || 'https'
@host = options[:host] || IronWorkerNG::APIClient::AWS_US_EAST_HOST
@port = options[:port] || 443

0 comments on commit b3165bc

Please sign in to comment.