Sha256: 706f803423ba5016c0b75f6671c6d6c24efc22a2a8f27ca781873de1fad9d361

Contents?: true

Size: 648 Bytes

Versions: 5

Compression:

Stored size: 648 Bytes

Contents

=begin
    Copyright 2010-2022 Ecsypno <http://www.ecsypno.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

# Integer option.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class Arachni::Component::Options::Int < Arachni::Component::Options::Base

    def normalize
        effective_value.to_i
    end

    def valid?
        return false if !super
        effective_value.to_s =~ /^\d+$/
    end

    def type
        :integer
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.6.1.3 lib/arachni/component/options/int.rb
arachni-1.6.1.2 lib/arachni/component/options/int.rb
arachni-1.6.1.1 lib/arachni/component/options/int.rb
arachni-1.6.1 lib/arachni/component/options/int.rb
arachni-1.6.0 lib/arachni/component/options/int.rb