Sha256: 9d66ab4649c02ddc33ad808e025a70690e746db42e401f6442470b319d320ac3
Contents?: true
Size: 1012 Bytes
Versions: 7
Compression:
Stored size: 1012 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 # MultipleChoice option. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class Arachni::Component::Options::MultipleChoice < Arachni::Component::Options::Base # The list of potential valid values attr_accessor :choices def initialize( name, options = {} ) options = options.dup @choices = [options.delete(:choices)].flatten.compact.map(&:to_s) super end def normalize super.to_s end def valid? return false if !super choices.include?( effective_value ) end def description "#{@description} (accepted: #{choices.join( ', ' )})" end def type :multiple_choice end end
Version data entries
7 entries across 7 versions & 1 rubygems