Permalink
Browse files

Adding aliases for the attribute writters

  • Loading branch information...
1 parent 445e1d1 commit 24d0893fddc6cf80bb1e3b8f831b2f86fa6738f9 @roman committed Sep 7, 2009
Showing with 15 additions and 3 deletions.
  1. +15 −3 lib/warden_oauth/config.rb
View
@@ -5,16 +5,28 @@ class Config
attr_accessor :provider_name
def consumer_key(key = nil)
- @consumer_key ||= key
+ unless key.nil?
+ @consumer_key = key
+ end
+ @consumer_key
end
+ alias_method :consumer_key=, :consumer_key
def consumer_secret(secret = nil)
- @consumer_secret ||= secret
+ unless secret.nil?
+ @consumer_secret = secret
+ end
+ @consumer_secret
end
+ alias_method :consumer_secret=, :consumer_secret
def options(options = nil)
- @options ||= options
+ unless options.nil?
+ @options = options
+ end
+ @options
end
+ alias_method :options=, :options
def check_requirements
if @consumer_key.nil? || @consumer_secret.nil?

0 comments on commit 24d0893

Please sign in to comment.