class Arachni::Component::Options::MultipleChoice
MultipleChoice
option.
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Attributes
choices[RW]
The list of potential valid values
Public Class Methods
new( name, options = {} )
click to toggle source
Calls superclass method
Arachni::Component::Options::Base::new
# File lib/arachni/component/options/multiple_choice.rb, line 17 def initialize( name, options = {} ) options = options.dup @choices = [options.delete(:choices)].flatten.compact.map(&:to_s) super end
Public Instance Methods
description()
click to toggle source
# File lib/arachni/component/options/multiple_choice.rb, line 32 def description "#{@description} (accepted: #{choices.join( ', ' )})" end
normalize()
click to toggle source
Calls superclass method
Arachni::Component::Options::Base#normalize
# File lib/arachni/component/options/multiple_choice.rb, line 23 def normalize super.to_s end
type()
click to toggle source
# File lib/arachni/component/options/multiple_choice.rb, line 36 def type :multiple_choice end
valid?()
click to toggle source
Calls superclass method
Arachni::Component::Options::Base#valid?
# File lib/arachni/component/options/multiple_choice.rb, line 27 def valid? return false if !super choices.include?( effective_value ) end