Sha256: 37d7edac245b62018cffc156d316fb4495378f006a73183820c14a5a0b64a666
Contents?: true
Size: 951 Bytes
Versions: 3
Compression:
Stored size: 951 Bytes
Contents
require "hitcher/version" require_relative 'hitcher/dsl' require_relative 'hitcher/run_ops' require_relative 'hitcher/gen_ops' module Hitcher class Error < StandardError; end # Your code goes here... CONF_PATH = File.join(Dir.home,".hitcher","hitcher_conf.yml") class Cli include Hitcher::Dsl include Hitcher::CliOps::RunOps include Hitcher::CliOps::GenOps # DSL start here! def parse(spec) if File.exist?(spec) File.open(spec,"r") do |f| @cont = f.read end begin @inst = start(@cont.strip.lines) @inst rescue Exception => ex Hitcher::Global.instance.glog.error ex.message Hitcher::Global.instance.glog.error ex.backtrace.join("\n") raise ex end #logger.debug "instance_eval after parse" else raise Error, "Given spec file '#{spec}' does not exist" end end # parse end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
Hitcher-0.1.3 | lib/hitcher.rb |
Hitcher-0.1.2 | lib/hitcher.rb |
Hitcher-0.1.1 | lib/hitcher.rb |