lib/page-object/elements/radio_button.rb in page-object-0.3.2 vs lib/page-object/elements/radio_button.rb in page-object-0.4.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'mixology'
+
module PageObject
module Elements
class RadioButton < Element
def initialize(element, platform)
@@ -11,13 +13,13 @@
def include_platform_for platform
super
if platform[:platform] == :watir_webdriver
require 'page-object/platforms/watir_webdriver/radio_button'
- self.class.send :include, PageObject::Platforms::WatirWebDriver::RadioButton
+ self.mixin PageObject::Platforms::WatirWebDriver::RadioButton
elsif platform[:platform] == :selenium_webdriver
require 'page-object/platforms/selenium_webdriver/radio_button'
- self.class.send :include, PageObject::Platforms::SeleniumWebDriver::RadioButton
+ self.mixin PageObject::Platforms::SeleniumWebDriver::RadioButton
else
raise ArgumentError, "expect platform to be :watir_webdriver or :selenium_webdriver"
end
end
end