Class: Objc2swiftAssistant::ScannedFileSet
- Inherits:
-
FileSet
- Object
- FailableProcessingElement
- FileSet
- Objc2swiftAssistant::ScannedFileSet
- Defined in:
- lib/objc2swift_assistant/file_sets.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#active_file_nodes ⇒ Object
Returns the value of attribute active_file_nodes.
Attributes inherited from FileSet
#configuration, #directory_nodes_by_path, #root, #root_dir_node
Attributes inherited from FailableProcessingElement
Instance Method Summary collapse
- #collect_active_file_nodes ⇒ Object
-
#initialize(root, configuration) ⇒ ScannedFileSet
constructor
A new instance of ScannedFileSet.
- #process_directory(path) ⇒ Object
- #process_file(path) ⇒ Object
Methods inherited from FileSet
#directory_node_for_path, #dump, #make_directory_node, #scan
Methods inherited from FailableProcessingElement
#add_error, #add_warning, #has_errors, #initiailize
Constructor Details
#initialize(root, configuration) ⇒ ScannedFileSet
Returns a new instance of ScannedFileSet.
75 76 77 |
# File 'lib/objc2swift_assistant/file_sets.rb', line 75 def initialize( root, configuration ) super( root, configuration ) end |
Instance Attribute Details
#active_file_nodes ⇒ Object
Returns the value of attribute active_file_nodes.
73 74 75 |
# File 'lib/objc2swift_assistant/file_sets.rb', line 73 def active_file_nodes @active_file_nodes end |
Instance Method Details
#collect_active_file_nodes ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/objc2swift_assistant/file_sets.rb', line 94 def collect_active_file_nodes @active_file_nodes = [] @directory_nodes_by_path.each do |_, directory_node | @configuration.log_verbose( "Collecting file nodes for directory:#{directory_node.full_path}") directory_node.file_nodes_by_name.each do |_, file_node | file_node.prepare_for_use() if file_node.should_be_used @active_file_nodes << file_node end end end end |
#process_directory(path) ⇒ Object
79 80 81 82 83 84 85 |
# File 'lib/objc2swift_assistant/file_sets.rb', line 79 def process_directory(path) directory_node = directory_node_for_path( path ) if directory_node.relative_path.to_s == '.' @root_dir_node = directory_node end @configuration.log_verbose( "Processing Directory: #{path.to_s}") end |
#process_file(path) ⇒ Object
87 88 89 90 91 |
# File 'lib/objc2swift_assistant/file_sets.rb', line 87 def process_file(path) @configuration.log_verbose( "Processing File: #{path.to_s}") dir_node = directory_node_for_path( path.parent ) dir_node.process_file( path ) end |