class Nomade::Job
Public Class Methods
new(image_full_name, config_hcl, config_json, config_hash)
click to toggle source
# File lib/nomade/job.rb, line 3 def initialize(image_full_name, config_hcl, config_json, config_hash) @image_full_name = image_full_name @config_hcl = config_hcl @config_json = config_json @config_hash = config_hash end
Public Instance Methods
configuration(format)
click to toggle source
# File lib/nomade/job.rb, line 10 def configuration(format) case format when :hcl @config_hcl when :json @config_json when :hash @config_hash else @config_hash end end
image_name()
click to toggle source
# File lib/nomade/job.rb, line 35 def image_name image_name_and_version.split(":").first end
image_name_and_version()
click to toggle source
# File lib/nomade/job.rb, line 31 def image_name_and_version @image_full_name end
image_version()
click to toggle source
# File lib/nomade/job.rb, line 39 def image_version image_name_and_version.split(":").last end
job_name()
click to toggle source
# File lib/nomade/job.rb, line 23 def job_name @config_hash["ID"] end
job_type()
click to toggle source
# File lib/nomade/job.rb, line 27 def job_type @config_hash["Type"] end