lib/algolia/transport/stateful_host.rb in algolia-2.3.4 vs lib/algolia/transport/stateful_host.rb in algolia-3.0.0.alpha.2

- old
+ new

@@ -1,8 +1,7 @@ module Algolia module Transport - # Class StatefulHost class StatefulHost include CallType attr_reader :url, :protocol, :accept attr_accessor :last_use, :retry_count, :up @@ -17,10 +16,10 @@ @url = url @protocol = opts[:protocol] || 'https://' @accept = opts[:accept] || (READ | WRITE) @last_use = opts[:last_use] || Time.now.utc @retry_count = opts[:retry_count] || 0 - @up = opts.has_key?(:up) ? opts[:up] : true + @up = opts.key?(:up) ? opts[:up] : true end end end end