Class: ObjectRepository::RepositoryElement

Inherits:
Object
  • Object
show all
Defined in:
lib/watir-or/element.rb

Direct Known Subclasses

CustomElement, WatirElement

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, repository, &block) ⇒ RepositoryElement

Returns a new instance of RepositoryElement.



5
6
7
8
9
# File 'lib/watir-or/element.rb', line 5

def initialize(name, repository, &block)
  @name = name 
  @repository = repository
  instance_eval &block
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/watir-or/element.rb', line 3

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/watir-or/element.rb', line 15

def ==(other)
  @name == other.name
end

#inspectObject



11
12
13
# File 'lib/watir-or/element.rb', line 11

def inspect
  "Element #{@name.inspect}"
end