lib/folder_metadata.rb
# Collects and read all YAML files.
# They are stored per each folder, in tuples: identifier and parsed content
Collects and read all YAML files.
They are stored per each folder, in tuples: identifier and parsed content
Collects and read all YAML files . They are stored per each folder in tuples : identifier and parsed content
def collect_yaml_files(item)
	if (File.extname(item.identifier) == ".yaml")
		folder = Pathname(item[:filename]).dirname.to_s
		folder_yamls = $yaml_files[folder]
		if (folder_yamls == nil)
			folder_yamls = Array.new
			$yaml_files[folder] = folder_yamls
		end
		tuple = Array.new
		tuple << item.identifier
		tuple << YAML.load_file(item[:filename])
		folder_yamls << tuple
	end
end
def collect_yaml_files ( item ) if ( File . extname ( item . identifier ) == ".yaml" ) folder = Pathname ( item [ :filename ] ) . dirname . to_s folder_yamls = $yaml_files [ folder ] if ( folder_yamls == nil ) folder_yamls = Array . new $yaml_files [ folder ] = folder_yamls end tuple = Array . new tuple << item . identifier tuple << YAML . load_file ( item [ :filename ] ) folder_yamls << tuple end end
Collects and read all YAML files.
Collects and read all YAML files .
item