Module: CapybaraPageObject::Collections

Included in:
Node
Defined in:
lib/key_value.rb,
lib/collections.rb

Instance Method Summary collapse

Instance Method Details

#formsObject



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

#keyObject



3
4
5
# File 'lib/key_value.rb', line 3

def key
  source[:id]
end

#tablesObject



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

#valueObject



7
8
9
# File 'lib/key_value.rb', line 7

def value
  text
end