module OscMacheteRails::JobHelpers

Private Instance Methods

parse_job!(args) click to toggle source
# File lib/generators/osc_machete_rails/job_helpers.rb, line 3
def parse_job!(args)
  jobs = args.grep(/:jobs$/)
  args = args - jobs

  job_attrib = jobs.first || "#{args.first.underscore}_job:jobs"
  Rails::Generators::GeneratedAttribute.parse job_attrib
end