Sha256: 704380e5facb5183f35a4cb51f945aba0f9773a8748a1692e45249bc7245b864
Contents?: true
Size: 898 Bytes
Versions: 15
Compression:
Stored size: 898 Bytes
Contents
# frozen_string_literal: true module Waylon module Conditions # A pre-made catch-all condition for ignoring messages class BlackHole < Condition # Overrides normal Condition initialization to force a specific action def initialize(*_args) # rubocop:disable Lint/MissingSuper @mechanism = nil @action = :ignore @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
15 entries across 15 versions & 1 rubygems