lib/dato/account/client.rb in dato-0.1.30 vs lib/dato/account/client.rb in dato-0.1.31

- old
+ new

@@ -20,17 +20,13 @@ sites: Repo::Site }.freeze attr_reader :token, :base_url, :schema, :extra_headers - def initialize( - token, - base_url: 'https://account-api.datocms.com', - extra_headers: {} - ) - @base_url = base_url + def initialize(token, options = {}) @token = token - @extra_headers = extra_headers + @base_url = options[:base_url] || 'https://account-api.datocms.com' + @extra_headers = options[:extra_headers] || {} end REPOS.each do |method_name, repo_klass| define_method method_name do instance_variable_set(