Module: Zander

Defined in:
lib/zander.rb,
lib/zander/site.rb,
lib/zander/util.rb,
lib/zander/sites.rb,
lib/zander/action.rb,
lib/zander/manual.rb,
lib/zander/version.rb,
lib/zander/cmd_mapper.rb

Overview

Utility helpers

Defined Under Namespace

Modules: CommandMapper, Manual, Util Classes: Action, Site, Sites

Constant Summary collapse

VERSION =

VERSION = ‘0.1.0’ # initial release VERSION = ‘0.1.1’ # fiexed binary and added documentation

'0.1.2'

Class Method Summary collapse

Class Method Details

.run(sites: nil, actions: nil, steps: nil) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/zander.rb', line 25

def self.run(sites: nil, actions: nil, steps: nil)
	
	if steps == nil
		steps = ARGV[0].split(',').map(&:to_i) unless ARGV[0] == nil
	end
	
	if (sites != nil && actions != nil)
		zander = Sites.new(sites,steps)
		zander.add_actions(actions)
	else
		zander = Sites.new(Util.get_path('share/sites.yaml'),steps)
		zander.add_actions(Util.get_path('share/actions.yaml'))
	end
	
	zander.set_log_level Logger::DEBUG
	zander.sites.each do |site|
		site.drive
	end

end