Sha256: 87879ca060e77a581b881ee22d0667d51d3b6721a2e66d24cd85dd4f7e2f3cbf
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
#!/usr/bin/env ruby def generate_controller(name, file) f = File.open(file, 'w') f << <<EOF class #{name} < Nephos::Controller def root return {plain: "index"} end end EOF end case ARGV[0] when "c", "controller" if not ARGV[1].to_s.empty? generate_controller("#{ARGV[1]}Controller", "src/#{ARGV[1]}.rb") end else puts "help: generate c[ontroller] name" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nephos-server-0.1 | bin/nephos-generator |