Module: Zander
- Defined in:
- lib/zander/util.rb,
lib/zander.rb,
lib/zander/site.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
- LOG_FILE =
'log.txt'
STDOUT- LOG =
::Logger.new(LOG_FILE,10,1024000)
- VERSION =
VERSION = '0.1.0' # initial release VERSION = '0.1.1' # fiexed binary and added documentation VERSION = '0.1.2' # updated gemspec
'0.1.3'- @@log_level =
nil
Class Method Summary collapse
Class Method Details
.log_level(level) ⇒ Object
51 52 53 |
# File 'lib/zander.rb', line 51 def self.log_level(level) @@log_level = level end |
.run(sites: nil, actions: nil, steps: nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/zander.rb', line 31 def self.run(sites: nil, actions: nil, steps: nil) LOG.level = Logger::INFO LOG.level = @@log_level unless @@log_level == 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, LOG) zander.add_actions(actions) else zander = Sites.new(Util.get_path('share/sites.yaml'),steps, LOG) zander.add_actions(Util.get_path('share/actions.yaml')) end zander.sites.each do |site| site.drive end end |