class Mikoshi::Plan::Base
Attributes
client[R]
data[R]
Public Class Methods
new(yaml_path: nil, client: nil)
click to toggle source
# File lib/mikoshi/plan.rb, line 14 def initialize(yaml_path: nil, client: nil) 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
Public Instance Methods
invoke_hooks(hooks)
click to toggle source
# File lib/mikoshi/plan.rb, line 22 def invoke_hooks(hooks) hooks.each do |hook| raise(HookExecutionError, hook) unless system(hook) end end