Module: SeleniumRecord::ComponentAutoload::ClassMethods
- Defined in:
- lib/selenium_record/component_autoload.rb
Overview
Class method helpers for autoloading components
Instance Method Summary collapse
- #action_component_reader(*names) ⇒ Object
- #component_method_regex ⇒ Object
-
#component_reader(*names) ⇒ Object
Inject components after loading dom, providing reader methods for accessing them /(?<component_name>.*)_(?<component_type>view|tab|pill|modal|panel)$/.
Instance Method Details
#action_component_reader(*names) ⇒ Object
111 112 113 |
# File 'lib/selenium_record/component_autoload.rb', line 111 def action_component_reader(*names) names.each { |name| load_action_component name } end |
#component_method_regex ⇒ Object
96 97 98 |
# File 'lib/selenium_record/component_autoload.rb', line 96 def component_method_regex /(?<component_name>.*)_(?<component_type>view|tab|pill|modal|panel)$/ end |
#component_reader(*names) ⇒ Object
Inject components after loading dom, providing reader methods for accessing them /(?<component_name>.*)_(?<component_type>view|tab|pill|modal|panel)$/
104 105 106 107 108 109 |
# File 'lib/selenium_record/component_autoload.rb', line 104 def component_reader(*names) names.each { |name| create_component_reader name } define_method :after_load_dom do load_components names end end |