Sha256: 0b716bacc386dca26b96cec87780184f093be1f1ef0f4045e536fa2328752d3e

Contents?: true

Size: 515 Bytes

Versions: 55

Compression:

Stored size: 515 Bytes

Contents

class Eco::API::UseCases::DefaultCases::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.map do |tag|
      [tag, tagtree.path(tag).join("|")]
    end
  end

  def tagtree
    session.tagtree
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
eco-helpers-2.5.9 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.8 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.7 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.6 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.5 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.4 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.3 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.2 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.5.1 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.9 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.8 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.7 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.6 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.5 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.4 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.3 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.4.2 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.3.3 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.3.2 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.2.5 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb