Sha256: 8df8f763d0f5f81d0c92dca231036c32a10a759e328daebbc7d38e84e4c30a53
Contents?: true
Size: 894 Bytes
Versions: 17
Compression:
Stored size: 894 Bytes
Contents
# frozen_string_literal: true module Waylon module Conditions # A pre-made catch-all condition for denying access class Default < Condition # Overrides normal Condition initialization to force a specific action def initialize(*_args) # rubocop:disable Lint/MissingSuper @mechanism = nil @action = :unknown @allowed_groups = [:everyone] @help = "" end # Matches any input (since the Default route, when used, should always function) # @return [Boolean] def matches?(_input) true end # Permits any user (since the Default route, when used, should always function) # @return [Boolean] def permits?(_user) true end # Just provides back all input as a single token # @return [Array<String>] def tokens(input) [input] end end end end
Version data entries
17 entries across 17 versions & 1 rubygems