Class: Lavender::Command
- Inherits:
-
Object
- Object
- Lavender::Command
- Defined in:
- lib/lavender/command.rb
Class Method Summary collapse
Class Method Details
.help ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/lavender/command.rb', line 21 def self.help puts "Usage: lavender command\n\nCommands:\n help This message\n compile Compiles the project in the current working directory\n" end |
.run(args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lavender/command.rb', line 3 def self.run args case args.first when 'help' self.help when nil self.help when 'compile' static = Lavender::Static.new true static.run when 'server' raise ArgumentError, "Not yet implemented" else raise ArgumentError, "Command not recognised" end end |