Module: Eco::Data::Locations::DSL

Overview

It allows to create your own helper

Examples:

of usage:

module LocHelp
  include Eco::Data::Locations::DSL
end

nodes_list = LocHelp.csv_nodes_from(csv_list_filename)
csv_tree   = LocHelp.nodes_to_csv_tree(nodes_list)
File.open(output_filename, 'w') { |fd| fd.write(csv_tree.to_csv) }

of usage:

class Foo
  include Eco::Data::Locations::DSL

  def csv_tree_to_csv_list(csv_tree_filename)
    csv_list = nodes_to_csv_list(csv_nodes_from(csv_tree_filename))
    File.open(output_filename, 'w') { |fd| fd.write(csv_list.to_csv) }
  end

  def live_tree_to_csv_tree(org_tagtree)
    File.open(output_filename, 'w') { |fd| fd.write(csv_tree(org_tagtree).to_csv) }
  end
end