lib/watir/elements/radio.rb in watir-6.13.0 vs lib/watir/elements/radio.rb in watir-6.14.0

- old
+ new

@@ -1,8 +1,7 @@ module Watir class Radio < Input - def initialize(query_scope, selector) super @selector[:label] = @selector.delete(:text) if @selector.key?(:text) end @@ -11,22 +10,22 @@ # def set click unless set? end - alias_method :select, :set + alias select set # # Is this radio set? # # @return [Boolean] # def set? element_call { @element.selected? } end - alias_method :selected?, :set? + alias selected? set? # # Returns the text of the associated label. # Returns empty string if no label is found. # @@ -35,19 +34,18 @@ def text l = label() l.exist? ? l.text : '' end - end # Radio module Container def radio(*args) - Radio.new(self, extract_selector(args).merge(tag_name: "input", type: "radio")) + Radio.new(self, extract_selector(args).merge(tag_name: 'input', type: 'radio')) end def radios(*args) - RadioCollection.new(self, extract_selector(args).merge(tag_name: "input", type: "radio" )) + RadioCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'radio')) end end # Container class RadioCollection < InputCollection private