Sha256: ad1535105c36dfaf5fc01a86780ae42c060ec9d66e5eb055312e5e8100ad8c7a

Contents?: true

Size: 1.17 KB

Versions: 40

Compression:

Stored size: 1.17 KB

Contents

module WorldData
  def environs
    @environs ||= TestCentricity::EnvironData.new
  end

  # instantiate and register all data objects specified in data_objects method
  def instantiate_data_objects
    # return if data objects have already been instantiated and registered
    return if TestCentricity::DataManager.loaded?

    data_objects.each do | data_type, data_class |
      # instantiate next data object
      eval("def #{data_type.to_s};@#{data_type.to_s} ||= #{data_class}.new;end")
      # register the data object
      TestCentricity::DataManager.register_data_object(data_type, data_class.new)
    end
  end
end


module WorldPages
  # instantiate and register all page objects specified in page_objects method
  def instantiate_page_objects
    # return if page objects have already been instantiated and registered
    return if TestCentricity::PageManager.loaded?

    page_objects.each do | page_object, page_class |
      # instantiate next page object
      eval("def #{page_object.to_s};@#{page_object.to_s} ||= #{page_class}.new;end")
      # register the page object
      TestCentricity::PageManager.register_page_object(page_object, page_class.new)
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
testcentricity_web-1.0.0.1 lib/testcentricity_web/world_extensions.rb
testcentricity_web-1.0.0 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.9 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.8 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.7 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.6 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.5 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.4 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.3 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.2 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9.1 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.9 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.8 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.7 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.6.3 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.6.2 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.6.1 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.6 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.5.1 lib/testcentricity_web/world_extensions.rb
testcentricity_web-0.9.5 lib/testcentricity_web/world_extensions.rb