Class: RedZone::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/redzone/cli.rb

Overview

RedZone Command-line actions

Instance Method Summary collapse

Instance Method Details

#generate(dir) ⇒ Object

Generates a bind database files into the given directory.



21
22
23
24
25
# File 'lib/redzone/cli.rb', line 21

def generate(dir)
  c = ZoneConfig.new(options[:zones])
  writer = ZonefileWriter.new(c)
  writer.write_zones(Pathname.new(dir))
end

#versionObject

Prints the current RedZone version to the console



29
30
31
# File 'lib/redzone/cli.rb', line 29

def version
  say "redzone v#{RedZone::VERSION}"
end