Module: CapybaraPageObject::HTML5Data
- Included in:
- Capybara::Node::Simple, Element
- Defined in:
- lib/capybara-page-object/html5_data.rb
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
3 4 5 6 7 8 |
# File 'lib/capybara-page-object/html5_data.rb', line 3 def data source.native.attributes.each_with_object({}) do |(k, v), hash| next unless k.start_with?('data-') hash[k.gsub('data-', '')] = v.value end end |