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.2.4 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.2.3 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.2.2 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.2.1 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.12 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.11 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.10 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.9 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.8 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.7 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.6 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.5 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.4 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.3 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.2 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.1.1 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.68 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.67 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.66 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.65 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb