Sha256: 4520b9e91347a4c525f5b07d8e1936c93527d04f630096c3ca1a7a8ffe6966e8

Contents?: true

Size: 529 Bytes

Versions: 28

Compression:

Stored size: 529 Bytes

Contents

class Eco::API::UseCases::Default::Locations::TagPaths < Eco::API::Common::Loaders::UseCase
  name "create-tag-paths"
  type :other

  def main(session, options, usecase)
    CSV.open("tag_paths.csv", "w") do |csv|
      csv << ["Tag", "Path"]
      tag_paths.each do |values|
        csv << values
      end
    end
  end

  private

  def tag_paths
    @tag_paths ||= tagtree.tags.reverse.map do |tag|
      [tag, tagtree.path(tag).join("|")]
    end
  end

  def tagtree
    session.tagtree
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
eco-helpers-3.0.4 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-3.0.3 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-3.0.2 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-3.0.1 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-3.0.0 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.25 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.24 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.23 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.22 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.21 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.20 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.19 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.18 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.17 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.16 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.15 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.14 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.13 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.12 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
eco-helpers-2.7.4 lib/eco/api/usecases/default/locations/create_tag_paths_case.rb