Module: Capybara::Wheel::Includes::ClassIncludes

Included in:
Element, Page
Defined in:
lib/capybara/wheel/includes.rb

Instance Method Summary collapse

Instance Method Details

#make_const(string) ⇒ Object



25
26
27
# File 'lib/capybara/wheel/includes.rb', line 25

def make_const(string)

end

#underscore(string) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/capybara/wheel/includes.rb', line 17

def underscore(string)
  string.gsub(/::/, '/').
          gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
          gsub(/([a-z\d])([A-Z])/,'\1_\2').
          tr("-", "_").
          downcase
end