Class: Stratagem::Crawler::Select

Inherits:
Input show all
Defined in:
lib/stratagem/crawler/form.rb

Direct Known Subclasses

Radio

Instance Attribute Summary

Attributes inherited from Input

#id, #name, #type, #value

Instance Method Summary collapse

Methods inherited from Input

#guess_alternate_attribute, #guess_attribute, #guess_model, #hidden?

Constructor Details

#initializeSelect

Returns a new instance of Select.



107
108
109
# File 'lib/stratagem/crawler/form.rb', line 107

def initialize
  @options = []
end

Instance Method Details

#<<(value) ⇒ Object



115
116
117
118
# File 'lib/stratagem/crawler/form.rb', line 115

def <<(value)
  @options << value
  self.value = value if self.value.nil?
end

#choose(value) ⇒ Object



111
112
113
# File 'lib/stratagem/crawler/form.rb', line 111

def choose(value)
  @value = value 
end