Sha256: 753d86f9ab1a5eeb5a7d9252e9bfbda316e13cf63a209f5140d249aa61e49f01
Contents?: true
Size: 870 Bytes
Versions: 6
Compression:
Stored size: 870 Bytes
Contents
=begin Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end # Boolean option. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class Arachni::Component::Options::Bool < Arachni::Component::Options::Base TRUE_REGEX = /^(y|yes|t|1|true|on)$/i VALID_REGEXP = /^(y|yes|n|no|t|f|0|1|true|false|on)$/i def valid? return false if !super effective_value.to_s.match( VALID_REGEXP ) end def normalize effective_value.to_s =~ TRUE_REGEX end def true? normalize end def false? !true? end def type :bool end end
Version data entries
6 entries across 6 versions & 1 rubygems