Module: CapybaraPageObject::Collections
- Included in:
- Node
- Defined in:
- lib/key_value.rb,
lib/collections.rb
Instance Method Summary collapse
Instance Method Details
#forms ⇒ Object
10 11 12 13 14 15 |
# File 'lib/collections.rb', line 10 def forms all('form').each_with_object({}) do |e, hash| f = CapybaraPageObject::Form.new(e) hash[f.key] = f end end |
#key ⇒ Object
3 4 5 |
# File 'lib/key_value.rb', line 3 def key source[:id] end |
#tables ⇒ Object
3 4 5 6 7 8 |
# File 'lib/collections.rb', line 3 def tables all('table').each_with_object({}) do |e, hash| t = CapybaraPageObject::Table.new(e) hash[t.key] = t end end |
#value ⇒ Object
7 8 9 |
# File 'lib/key_value.rb', line 7 def value text end |