Class: Geostats::Commands::Generate

Inherits:
Base
  • Object
show all
Defined in:
lib/geostats/commands/generate.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #invoke

Constructor Details

This class inherits a constructor from Geostats::Commands::Base

Instance Method Details

#beforeObject



12
13
14
# File 'lib/geostats/commands/generate.rb', line 12

def before
  connect_database
end

#parse_argsObject

Raises:



8
9
10
# File 'lib/geostats/commands/generate.rb', line 8

def parse_args
  raise UsageError unless @args.length.zero?
end

#runObject



16
17
18
# File 'lib/geostats/commands/generate.rb', line 16

def run
  puts Generator.generate
end

#usageObject



4
5
6
# File 'lib/geostats/commands/generate.rb', line 4

def usage
  STDERR.puts "Usage: geostats generate"
end