Class: Capybara::PomPom::Component
- Inherits:
-
Object
- Object
- Capybara::PomPom::Component
- Includes:
- Finder
- Defined in:
- lib/capybara/pompom/component.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
Instance Method Summary collapse
-
#initialize(component) ⇒ Component
constructor
A new instance of Component.
- #method_missing(name, *args) ⇒ Object
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
#component ⇒ Object (readonly)
Returns the value of attribute component.
5 6 7 |
# File 'lib/capybara/pompom/component.rb', line 5 def component @component end |