Sha256: e36a36bb6ef688e86b514f25f7770c59f715caf0ced8edbfe8f5541b770991a5
Contents?: true
Size: 392 Bytes
Versions: 1
Compression:
Stored size: 392 Bytes
Contents
# frozen_string_literal: true class Critic::Authorization attr_reader :policy, :action attr_accessor :messages, :granted, :result, :metadata def initialize(policy, action) @policy = policy @action = action&.to_sym @metadata = {} @granted, @result = nil @messages = [] end def granted? true == @granted end def denied? false == @granted end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
critic-0.2.0 | lib/critic/authorization.rb |