lib/mikoshi/plan.rb in mikoshi-0.1.5 vs lib/mikoshi/plan.rb in mikoshi-0.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'active_support/core_ext/hash/keys'
require 'erb'
require 'yaml'
module Mikoshi
@@ -11,9 +13,15 @@
raise ArgumentError, 'Yaml file path is required.' if yaml_path.nil?
raise ArgumentError, 'client is required.' if client.nil?
@data = YAML.safe_load(ERB.new(File.new(yaml_path).read).result).deep_symbolize_keys
@client = client
+ end
+
+ def invoke_hooks(hooks)
+ hooks.each do |hook|
+ system hook
+ end
end
end
end
end