Class: ObjectRepository::CustomElement
- Inherits:
-
RepositoryElement
- Object
- RepositoryElement
- ObjectRepository::CustomElement
- Defined in:
- lib/watir-or/element.rb
Instance Attribute Summary
Attributes inherited from RepositoryElement
Instance Method Summary collapse
- #field(name, field_name = nil, &block) ⇒ Object
-
#initialize(*args) ⇒ CustomElement
constructor
A new instance of CustomElement.
Methods inherited from RepositoryElement
Constructor Details
#initialize(*args) ⇒ CustomElement
Returns a new instance of CustomElement.
37 38 39 40 |
# File 'lib/watir-or/element.rb', line 37 def initialize(*args) @attributes = {} super(*args) end |
Instance Method Details
#field(name, field_name = nil, &block) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/watir-or/element.rb', line 42 def field(name, field_name = nil, &block) if block_given? @attributes[name] = block return end if field_name @attributes[name] = field_name else get_field(name) end end |