lib/ebay/config.rb in ebay-ruby-0.0.1 vs lib/ebay/config.rb in ebay-ruby-0.2.0

- old
+ new

@@ -1,11 +1,15 @@ module Ebay module Config class << self - attr_writer :app_id + %i(app_id dev_id cert_id).each do |method| + eval <<-DEF + attr_writer :#{method} - def app_id - @app_id || ENV['EBAY_APP_ID'] + def #{method} + @#{method} || ENV['EBAY_#{method.upcase}'] + end + DEF end end end end