Sha256: c8453d00c266429b81e79adaf2296b0943e032ea97309ffcaba2af896da4e24b

Contents?: true

Size: 776 Bytes

Versions: 3

Compression:

Stored size: 776 Bytes

Contents

module Katello
  class RepositoryPresenter
    attr_accessor :repository

    def initialize(repository)
      @repository = repository
    end

    def content_view_environments
      unarchived = @repository.clones.select { |clone| clone.environment && clone.content_view_version }

      unarchived.collect do |repository|
        if repository.environment && repository.content_view_version
          {
            :content_view_version => {
              :id => repository.content_view_version.id,
              :name => repository.content_view_version.name,
            },
            :environment => {
              :id => repository.environment.id,
              :name => repository.environment.name,
            },
          }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-4.15.0 app/presenters/katello/repository_presenter.rb
katello-4.15.0.rc2 app/presenters/katello/repository_presenter.rb
katello-4.15.0.rc1 app/presenters/katello/repository_presenter.rb