Sha256: d208a87a2aedc8b725a579d03d061073a594dcca852cf3dac35e65aa0163e11f

Contents?: true

Size: 423 Bytes

Versions: 4

Compression:

Stored size: 423 Bytes

Contents

# frozen_string_literal: true

module Masks
  module Access
    # Access class for +actor.password+
    #
    # This access class can change that actor's password.
    class ActorPassword
      include Access

      access "actor.password"

      def change_password(password)
        actor.changed_password_at = Time.current
        actor.password = password
        actor.save if actor.valid?
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
masks-0.3.2 app/models/masks/access/actor_password.rb
masks-0.3.1 app/models/masks/access/actor_password.rb
masks-0.3.0 app/models/masks/access/actor_password.rb
masks-0.2.0 app/models/masks/access/actor_password.rb