lib/cultural_network/import/feature_data.rb
# ##################################################################### #
# Returns array of paths to create Hpricot docs from
# Given a directory containing lots of xml files, 
# create an array of the path to each xml file. 
# Then, for each of these xml files, try to parse them with hpricot
# If a file parses successfully, add it to an array called docs
# Return docs, which now contains hpricot objects for all of the features
# we want to import 
#
Returns array of paths to create Hpricot docs from
Given a directory containing lots of xml files,
create an array of the path to each xml file.
Then, for each of these xml files, try to parse them with hpricot
If a file parses successfully, add it to an array called docs
Return docs, which now contains hpricot objects for all of the features
we want to import
Returns array of paths to create Hpricot docs from Given a directory containing lots of xml files create an array of the path to each xml file . Then for each of these xml files try to parse them with hpricot If a file parses successfully add it to an array called docs Return docs which now contains hpricot objects for all of the features we want to import
def fetch_feature_docs
      docs=[]
      d = Dir[@source + "/*.xml"]
      d.entries.each do |file|
          docs << file
      end
      docs
    end
def fetch_feature_docs docs = [ ] d = Dir [ @source + "/*.xml" ] d . entries . each do | file | docs << file end docs end
Returns array of paths to create Hpricot docs from
Given a directory containing lots of xml files,
create an array of the path to each xml file.
Returns array of paths to create Hpricot docs from Given a directory containing lots of xml files create an array of the path to each xml file .
#puts d.inspect #puts docs.inspect