Class: Datacraft::Cli
- Inherits:
-
Thor
- Object
- Thor
- Datacraft::Cli
- Defined in:
- lib/datacraft/cli.rb
Overview
command line interface
Instance Method Summary collapse
Instance Method Details
#build(filename) ⇒ Object
7 8 9 |
# File 'lib/datacraft/cli.rb', line 7 def build(filename) Datacraft.run check(filename) end |
#check(filename) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/datacraft/cli.rb', line 13 def check(filename) begin script = IO.read(filename) instruction = Datacraft.parse script puts 'You are ready to go.' instruction rescue InvalidInstruction => e puts e end end |