Sha256: 84a0658237fc4a108954aad4df99d1c3b8de490c6f821aa52f501fdbd0958936

Contents?: true

Size: 544 Bytes

Versions: 62

Compression:

Stored size: 544 Bytes

Contents

module CurationConcerns
  class VersionPresenter
    attr_reader :version, :current

    def initialize(version)
      @version = version
      @current = false
    end

    delegate :label, :uri, to: :version
    alias current? current

    def current!
      @current = true
    end

    def created
      @created ||= version.created.to_time.to_formatted_s(:long_ordinal)
      @created
    end

    def committer
      vc = VersionCommitter.where(version_id: @version.uri)
      vc.empty? ? nil : vc.first.committer_login
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
curation_concerns-1.3.2 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.3.1 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.3.0 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.2.0 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.1.2 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.1.1 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.1.0 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta10 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta9 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta8 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta7 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta6 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta5 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta4 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta3 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta2 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-1.0.0.beta1 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-0.14.0 app/presenters/curation_concerns/version_presenter.rb
curation_concerns-0.14.0.pre4 app/presenters/curation_concerns/version_presenter.rb