Module: QAT::Web::Configuration
- Included in:
- Elements::Selector, Finders
- Defined in:
- lib/qat/web/configuration.rb
Overview
Class Method Summary collapse
-
.last_access ⇒ Hash
Returns the last value accessed from configuration in all QAT::Web::Configuration instances.
-
.last_access=(value) ⇒ Hash
Sets the last value accessed from configuration in all QAT::Web::Configuration instances.
Instance Method Summary collapse
-
#last_access ⇒ Hash
Returns the last value accessed from configuration.
-
#parse_configuration(config) ⇒ Array
Parses the configuration value into a usable Capybara selector.
Class Method Details
.last_access ⇒ Hash
Returns the last value accessed from configuration in all QAT::Web::Configuration instances
31 32 33 |
# File 'lib/qat/web/configuration.rb', line 31 def last_access @last_access end |
.last_access=(value) ⇒ Hash
Sets the last value accessed from configuration in all QAT::Web::Configuration instances
41 42 43 |
# File 'lib/qat/web/configuration.rb', line 41 def last_access=(value) @last_access=value end |
Instance Method Details
#last_access ⇒ Hash
Returns the last value accessed from configuration
24 25 26 |
# File 'lib/qat/web/configuration.rb', line 24 def last_access @last_access end |
#parse_configuration(config) ⇒ Array
Parses the configuration value into a usable Capybara selector
13 14 15 16 17 18 19 20 |
# File 'lib/qat/web/configuration.rb', line 13 def parse_configuration config Configuration.last_access = config @last_access = config type = config.fetch :type, Capybara.default_selector value = config.fetch :value opts = config.select { |key, _| Capybara::Queries::SelectorQuery::VALID_KEYS.include? key } return type.to_sym, value, opts.to_hash.symbolize_keys end |