Class: Webrat::RadioField
- Defined in:
- lib/webrat/core/elements/field.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Field
Attributes inherited from Element
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Field
#disabled?, field_class, field_classes, #id, inherited, #initialize, #label_text, load, #raise_error_if_disabled, #set, #unset, xpath_search_excluding_hidden
Methods inherited from Element
#initialize, #inspect, load, load_all, #path
Constructor Details
This class inherits a constructor from Webrat::Field
Class Method Details
.xpath_search ⇒ Object
305 306 307 |
# File 'lib/webrat/core/elements/field.rb', line 305 def self.xpath_search ".//input[@type = 'radio']" end |
Instance Method Details
#checked? ⇒ Boolean
323 324 325 |
# File 'lib/webrat/core/elements/field.rb', line 323 def checked? @element["checked"] == "checked" end |
#choose ⇒ Object
314 315 316 317 318 319 320 321 |
# File 'lib/webrat/core/elements/field.rb', line 314 def choose raise_error_if_disabled .each do |option| option.set(nil) end set(@element["value"] || "on") end |
#to_param ⇒ Object
309 310 311 312 |
# File 'lib/webrat/core/elements/field.rb', line 309 def to_param return nil if @value.nil? super end |