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.0.64 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.63 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.62 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.61 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.60 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.59 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.58 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.57 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.56 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.55 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.54 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.53 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.52 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.51 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb
eco-helpers-2.0.50 lib/eco/api/usecases/default_cases/create_tag_paths_case.rb