Module: ActiveResourceInstanceAuthentication::ActiveResourceExtensions::ClassMethods
- Defined in:
- lib/active_resource_instance_authentication.rb
Instance Method Summary collapse
Instance Method Details
#authenticate(username, password) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/active_resource_instance_authentication.rb', line 86 def authenticate(username, password) obj = self.new obj.user = username obj.password = password if block_given? yield obj else obj end end |