Sha256: 3e7577c0a168ebef6f4decb284dcb9492c04d48ed8d916cbbadef1c0d48217e9

Contents?: true

Size: 428 Bytes

Versions: 6

Compression:

Stored size: 428 Bytes

Contents

require 'yaml'

module Rjobs
  class JobInputFile
    attr_accessor :jobName, :jobIdFrom, :jobIdTo, :command

    def initialize(fileName="")      
      parse(fileName)
    end

    def parse(fileName)
      config = YAML::load(File.open(fileName))
      @jobName = config['JobName']
      config['JobId'] =~ /(\d+)\-(\d+)/
      @jobIdFrom = $1      
      @jobIdTo = $2

      @command = config['Command']
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rjobs-0.3.3.alpha lib/rjobs/job_input_file.rb
rjobs-0.3.2.alpha lib/rjobs/job_input_file.rb
rjobs-0.3.1.alpha lib/rjobs/job_input_file.rb
rjobs-0.3.0.alpha lib/rjobs/job_input_file.rb
rjobs-0.2.0.alpha lib/rjobs/job_input_file.rb
rjobs-0.1.0.alpha lib/rjobs/job_input_file.rb