Class: DocTestFileList
- Inherits:
-
Object
- Object
- DocTestFileList
- Defined in:
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list.rb
Overview
Instance Attribute Summary collapse
-
#file_list ⇒ Object
Returns the value of attribute file_list.
Instance Method Summary collapse
-
#-(other) ⇒ Hash
Get diff between two file list.
-
#[](key) ⇒ DocTestSiteFileListEntry
Access file in list like array.
-
#initialize(file_list = []) ⇒ DocTestFileList
constructor
A new instance of DocTestFileList.
Constructor Details
#initialize(file_list = []) ⇒ DocTestFileList
Returns a new instance of DocTestFileList.
9 10 11 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list.rb', line 9 def initialize(file_list = []) @file_list = file_list end |
Instance Attribute Details
#file_list ⇒ Object
Returns the value of attribute file_list.
7 8 9 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list.rb', line 7 def file_list @file_list end |
Instance Method Details
#-(other) ⇒ Hash
Get diff between two file list
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list.rb', line 23 def -(other) diff_items = [] @file_list.each do |current_item| found = false other.file_list.each do |other_item| found = true if current_item == other_item end diff_items << current_item unless found end diff_items end |
#[](key) ⇒ DocTestSiteFileListEntry
Access file in list like array
16 17 18 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list.rb', line 16 def [](key) @file_list[key] end |