Sha256: b271c65dcd0032d0741f2a80d755ad6a5fb893071ebdbd42ee98d8fd7b0b0eda

Contents?: true

Size: 242 Bytes

Versions: 8

Compression:

Stored size: 242 Bytes

Contents

class String
  
  #
  # "Watir::Span" => "Span"
  # 
  
  def demodulize
    gsub(/^.*::/, '')
  end
  
  #
  # "FooBar" => "foo_bar"
  # 
  
  def underscore
    gsub(/\B[A-Z][^A-Z]/, '_\&').downcase.gsub(' ', '_')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
watir-1.7.1 lib/watir/core_ext.rb
watir-1.7.0 lib/watir/core_ext.rb
watir-1.7.0.rc1 lib/watir/core_ext.rb
watir-1.6.7 lib/watir/core_ext.rb
watir-1.6.7.rc1 lib/watir/core_ext.rb
watir-1.6.6 lib/watir/core_ext.rb
watir-1.6.6.rc2 lib/watir/core_ext.rb
watir-1.6.6.rc1 lib/watir/core_ext.rb