Module: Capybara::Widgets::StringHelpers
- Defined in:
- lib/capybara/widgets/helpers/string_helpers.rb
Instance Method Summary collapse
- #apply_action_chain(widget, chain) ⇒ Object
- #to_widget_action(name, suffix = nil) ⇒ Object
- #to_widget_class(name) ⇒ Object
Instance Method Details
#apply_action_chain(widget, chain) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/capybara/widgets/helpers/string_helpers.rb', line 12 def apply_action_chain(, chain) if chain.length > 0 = .send(chain[0]) return apply_action_chain(, chain[1..-1]) else return end end |
#to_widget_action(name, suffix = nil) ⇒ Object
8 9 10 |
# File 'lib/capybara/widgets/helpers/string_helpers.rb', line 8 def (name, suffix=nil) "#{name.to_s.strip.downcase.gsub(' ','_')}#{suffix}" end |
#to_widget_class(name) ⇒ Object
4 5 6 |
# File 'lib/capybara/widgets/helpers/string_helpers.rb', line 4 def (name) name.to_s.strip.gsub(' ','_').classify.constantize end |