lib/druid/elements/radio_button.rb in druid-ts-0.0.1 vs lib/druid/elements/radio_button.rb in druid-ts-1.1.0
- old
+ new
@@ -1,7 +1,32 @@
module Druid
module Elements
class RadioButton < Element
+ def self.finders
+ super + [:value]
+ end
+ #
+ # Select the RadioButton
+ #
+ def select
+ element.set
+ end
+
+ #
+ # Clear the RadioButton
+ #
+ def clear
+ element.clear
+ end
+
+ #
+ # Return if it is selected
+ #
+ def selected?
+ element.set?
+ end
end
+
+ Druid::Elements.type_to_class[:radio] = Druid::Elements::RadioButton
end
end