Class: Shaderize::CLI
- Inherits:
-
Object
- Object
- Shaderize::CLI
- Defined in:
- lib/shaderize.rb
Class Method Summary collapse
Class Method Details
.error(message = nil) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/shaderize.rb', line 26 def self.error( = nil) puts "Shaderize v#{VERSION}" puts "Usage: shaderize [shader_dir] [output_dir]\n" puts unless .nil? exit 1 end |
.start ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/shaderize.rb', line 14 def self.start error unless ARGV.length == 2 shader_dir = File.(ARGV[0]) output_dir = File.(ARGV[1]) error "Not a directory: '#{shader_dir}'" unless File.directory?(shader_dir) error "Not a directory: '#{output_dir}'" unless File.directory?(output_dir) Scaffold.scaffold(shader_dir, output_dir) end |