Class: Objc2swiftAssistant::ObjCDirectoryNode
Instance Attribute Summary collapse
#child_directories, #file_nodes_by_name, #file_set, #full_path, #parent_node, #pruned, #relative_path
Instance Method Summary
collapse
#add_child_directory, #dump
Constructor Details
163
164
165
|
# File 'lib/objc2swift_assistant/file_sets.rb', line 163
def initialize(path, file_set)
super(path, file_set)
end
|
Instance Attribute Details
#associated_generated_directory ⇒ Object
Returns the value of attribute associated_generated_directory.
161
162
163
|
# File 'lib/objc2swift_assistant/file_sets.rb', line 161
def associated_generated_directory
@associated_generated_directory
end
|
Instance Method Details
#create_associated_generated_nodes(generated_file_set) ⇒ Object
198
199
200
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/objc2swift_assistant/file_sets.rb', line 198
def create_associated_generated_nodes( generated_file_set )
return if @pruned
generated_relative_path = generated_file_set.root + @relative_path
@associated_generated_directory = generated_file_set.directory_node_for_path( generated_relative_path )
@file_nodes_by_name.each_value do |file_node|
file_node.create_generated_file_nodes( generated_file_set, @associated_generated_directory )
end
end
|
#file_node_for_file(without_extension_string) ⇒ Object
187
188
189
190
191
192
193
194
195
196
|
# File 'lib/objc2swift_assistant/file_sets.rb', line 187
def file_node_for_file( without_extension_string )
file_node = @file_nodes_by_name[ without_extension_string ]
if file_node.nil?
file_node = ObjCFileNode.new( self, without_extension_string )
@file_nodes_by_name[ without_extension_string ] = file_node
end
return file_node
end
|
#process_file(path) ⇒ Object
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
# File 'lib/objc2swift_assistant/file_sets.rb', line 167
def process_file( path )
basename = path.basename
without_extension = path.basename(".h") || path.basename(".hh")
if without_extension != basename
file_node = file_node_for_file( without_extension.to_s )
file_node. = path
return
end
without_extension = path.basename(".m") || path.basename(".mm")
if without_extension != basename
file_node = file_node_for_file( without_extension.to_s )
file_node.implementation_file_path = path
return
end
@file_set.configuration.log_verbose( "File not captured:#{path.to_s}")
end
|