Class: TestCentricity::DataSource

Inherits:
Object
  • Object
show all
Defined in:
lib/testcentricity_web/data_objects_helper.rb

Direct Known Subclasses

EnvironData

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#currentObject

Returns the value of attribute current.



22
23
24
# File 'lib/testcentricity_web/data_objects_helper.rb', line 22

def current
  @current
end

Instance Method Details

#pick_excel_data_source(sheet, row_name) ⇒ Object



24
25
26
27
28
# File 'lib/testcentricity_web/data_objects_helper.rb', line 24

def pick_excel_data_source(sheet, row_name)
  data_file = Excel_Data.get_environment_data_file
  data_file = XL_PRIMARY_DATA_FILE unless Excel_Data.rowspec_exists?(data_file, sheet, row_name)
  data_file
end

#read_excel_pool_data(sheet, row_name) ⇒ Object



34
35
36
# File 'lib/testcentricity_web/data_objects_helper.rb', line 34

def read_excel_pool_data(sheet, row_name)
  Excel_Data.read_row_from_pool(pick_excel_data_source(sheet, row_name), sheet, row_name)
end

#read_excel_row_data(sheet, row_name) ⇒ Object



30
31
32
# File 'lib/testcentricity_web/data_objects_helper.rb', line 30

def read_excel_row_data(sheet, row_name)
  Excel_Data.read_row_data(pick_excel_data_source(sheet, row_name), sheet, row_name)
end