68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/masamune/data_plan/elem.rb', line 68
def explode
return Set.new(to_enum(__method__)) unless block_given?
if rule.for_path? && rule.free?
file_glob = path
file_glob += '/*' unless path.include?('*') || path.include?('.')
rule.engine.filesystem.glob(file_glob, max_depth: rule.cache_depth) do |new_path|
yield rule.bind_input(new_path)
end
elsif rule.for_path? && rule.bound?
yield self if exists?
elsif rule.for_table?
yield self if exists?
end
end
|