Class: Stratagem::Crawler::Toggle

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

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?

Instance Method Details

#checkObject



93
94
95
# File 'lib/stratagem/crawler/form.rb', line 93

def check
  @value = '1'
end

#checked?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/stratagem/crawler/form.rb', line 101

def checked?
  @value == '1'
end

#uncheckObject



97
98
99
# File 'lib/stratagem/crawler/form.rb', line 97

def uncheck
  @value = '0'
end