Sha256: a8582beb5463a8a6ccbad239e697c55cddc91e07c7e45f5f3a41fbc914de5362

Contents?: true

Size: 363 Bytes

Versions: 3

Compression:

Stored size: 363 Bytes

Contents

class Kuroko2::Api::JobDefinitionResource < Kuroko2::Api::ApplicationResource
  property :id

  property :name

  property :description

  property :script

  property :tags

  property :cron

  def tags
    model.tags.map(&:name)
  end

  def cron
    model.job_schedules.map(&:cron)
  end

  delegate :id, :name, :description, :script, :destroy, to: :model
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuroko2-0.8.0 app/models/kuroko2/api/job_definition_resource.rb
kuroko2-0.7.0 app/models/kuroko2/api/job_definition_resource.rb
kuroko2-0.6.0 app/models/kuroko2/api/job_definition_resource.rb