Skip to content

Commit

Permalink
Merge pull request #37 from square/tarcieri/add-each-to-credentials
Browse files Browse the repository at this point in the history
Forward #each on Rails::Auth::Credentials and make it Enumerable
  • Loading branch information
tarcieri committed Jul 19, 2016
2 parents 06fdf9f + e429693 commit ba7f2e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rails/auth/credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ module Auth
# Stores a set of credentials
class Credentials
extend Forwardable
include Enumerable

def_delegators :@credentials, :[], :fetch, :empty?, :key?, :to_hash
def_delegators :@credentials, :[], :fetch, :empty?, :key?, :each, :to_hash

def self.from_rack_env(env)
new(env.fetch(Rails::Auth::Env::CREDENTIALS_ENV_KEY, {}))
Expand Down

0 comments on commit ba7f2e1

Please sign in to comment.