Class: ATT::WindowFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/popup/window_factory.rb

Direct Known Subclasses

RegFactory

Constant Summary collapse

@@config_root =
File.join(__FILE__,'..','constants')

Class Method Summary collapse

Class Method Details

._config(file_name) ⇒ Object



11
12
13
# File 'lib/popup/window_factory.rb', line 11

def _config(file_name)
  YAML.load_file(File.join(@@config_root,file_name)) 
end

._make_other(container, type, locators) ⇒ Object



25
26
27
# File 'lib/popup/window_factory.rb', line 25

def _make_other(container,type,locators)
  container.send(type,locators)
end

.config(klass) ⇒ Object



7
8
9
10
# File 'lib/popup/window_factory.rb', line 7

def config(klass)
  klass = klass.class unless klass.kind_of?(Class)
  _config(klass.to_s.split('::')[-1].underscore + '.yml')
end

.make(klass) ⇒ Object

Raises:



15
16
17
# File 'lib/popup/window_factory.rb', line 15

def make(klass)
  raise NotImplementError,"this feature no implement yeat."
end

.make_other(container, e) ⇒ Object



19
20
21
22
23
# File 'lib/popup/window_factory.rb', line 19

def make_other(container,e)
  type = e["type"]
  locators = e["default_locators"]
  _make_other(container,type,locators)
end