module APIKey
  module ClassMethods
    attr_accessor :default_api_key
  end

  def self.included( klass )
    klass.extend ClassMethods
  end

  attr_writer :api_key

  def api_key
    @api_key || self.class.default_api_key
  end
end

module APIKey
  module ClassMethods
    attr_accessor :api_key
  end

  def self.included( klass )
    klass.extend ClassMethods
  end

  attr_writer :api_key

  def api_key
    @api_key || self.class.api_key
  end
end

Refactor default key call to match instance call.
Refactor default key call to match instance call.

The class and instance method names were out of sync. It feels like
it should make more sense to make them the same.
