Skip to content

Instantly share code, notes, and snippets.

@michaelgpearce
Last active March 14, 2019 00:41
Show Gist options
  • Save michaelgpearce/67b2c524dec2443d1d9790817b262071 to your computer and use it in GitHub Desktop.
Save michaelgpearce/67b2c524dec2443d1d9790817b262071 to your computer and use it in GitHub Desktop.
Parallel Workforce Actor
require 'bcrypt'
class PasswordHashGenerator
attr_reader :password
def initialize(password:)
@password = password
end
def perform
BCrypt::Password.create(password, cost: 15).to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment