module Mobilize::StageHelper

Public Instance Methods

err_dst() click to toggle source
# File lib/mobilize-base/helpers/stage_helper.rb, line 17
def err_dst
  #this gives a dataset that points to the output
  #allowing you to determine its size
  #before committing to a read or write
  s = self
  Dataset.find_by_url(s.response['err_url']) if s.response and s.response['err_url']
end
idx() click to toggle source
# File lib/mobilize-base/helpers/stage_helper.rb, line 4
def idx
  s = self
  s.path.split("/").last.gsub("stage","").to_i
end
job() click to toggle source
# File lib/mobilize-base/helpers/stage_helper.rb, line 32
def job
  s = self
  job_path = s.path.split("/")[0..-2].join("/")
  Job.where(:path=>job_path).first
end
out_dst() click to toggle source
# File lib/mobilize-base/helpers/stage_helper.rb, line 9
def out_dst
  #this gives a dataset that points to the output
  #allowing you to determine its size
  #before committing to a read or write
  s = self
  Dataset.find_by_url(s.response['out_url']) if s.response and s.response['out_url']
end
params() click to toggle source
# File lib/mobilize-base/helpers/stage_helper.rb, line 25
def params
  s = self
  p = YAML.easy_load(s.param_string)
  raise "Must resolve to Hash" unless p.class==Hash
  return p
end