Sha256: 3fe3c09f6740242f634b57e7e88429e4ac096766bbabc3ff3415b45c7ba7a4e7

Contents?: true

Size: 257 Bytes

Versions: 12

Compression:

Stored size: 257 Bytes

Contents

module MissionControl::Jobs::IdentifiedByName
  extend ActiveSupport::Concern

  included do
    attr_reader :name
    alias to_s name
  end

  def initialize(name:)
    @name = name.to_s
  end

  def id
    name.parameterize
  end

  alias to_param id
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mission_control-jobs-0.6.0 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.5.0 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.4.0 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.3.3 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.3.2 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.3.1 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.3.0 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.2.2 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.2.1 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.2.0 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.1.1 lib/mission_control/jobs/identified_by_name.rb
mission_control-jobs-0.1.0 lib/mission_control/jobs/identified_by_name.rb