Class: Capybara::PomPom::Component

Inherits:
Object
  • Object
show all
Includes:
Finder
Defined in:
lib/capybara/pompom/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Finder

#button, #components, #css, #field, included, #link, #table

Constructor Details

#initialize(component) ⇒ Component

Returns a new instance of Component.



15
16
17
# File 'lib/capybara/pompom/component.rb', line 15

def initialize(component)
  @component = component
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/capybara/pompom/component.rb', line 7

def method_missing(name, *args)
  if self.finders.has_key?(name)
    return self.finders[name].get(component)
  end

  super
end

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



5
6
7
# File 'lib/capybara/pompom/component.rb', line 5

def component
  @component
end