Sha256: 807843b27dd634427b7157ae0a9af8206376d10048fdb6fb49d8cff9955d211e

Contents?: true

Size: 663 Bytes

Versions: 7

Compression:

Stored size: 663 Bytes

Contents

=begin
    Copyright 2010-2014 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

# 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

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 lib/arachni/component/options/int.rb
arachni-1.0.5 lib/arachni/component/options/int.rb
arachni-1.0.4 lib/arachni/component/options/int.rb
arachni-1.0.3 lib/arachni/component/options/int.rb
arachni-1.0.2 lib/arachni/component/options/int.rb
arachni-1.0.1 lib/arachni/component/options/int.rb
arachni-1.0 lib/arachni/component/options/int.rb