lib/firewatir/element_collections.rb in firewatir-1.8.0 vs lib/firewatir/element_collections.rb in firewatir-1.8.1.rc1
- old
+ new
@@ -7,12 +7,12 @@
class ElementCollections
include Enumerable
include JsshSocket
def self.inherited subclass
- class_name = subclass.to_s.demodulize
- method_name = class_name.underscore
- element_class_name = class_name.singularize
+ class_name = Watir::Util.demodulize(subclass.to_s)
+ method_name = Watir::Util.underscore(class_name)
+ element_class_name = Watir::Util.singularize(class_name)
FireWatir::Container.module_eval "def #{method_name}
locate if respond_to?(:locate)
return #{class_name}.new(self); end"