sapling.rb: Update for gemspec
- Modify required gems in accordance with re-org - Fix minor logic bug for 'read' command - Remove start command; placed into executable in bin/
This commit is contained in:
parent
a37b089074
commit
7a7f06485f
1 changed files with 2 additions and 4 deletions
|
@ -3,13 +3,13 @@
|
||||||
require 'thor'
|
require 'thor'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
|
||||||
Dir[File.join(__dir__, '..', 'lib', '*.rb')].each { |file| require file }
|
Dir[File.join(__dir__, 'sapling', '*.rb')].each { |file| require file }
|
||||||
|
|
||||||
# The main Sapling interface.
|
# The main Sapling interface.
|
||||||
class Sapling < Thor
|
class Sapling < Thor
|
||||||
desc 'read TREE', 'Load and traverse the TREE'
|
desc 'read TREE', 'Load and traverse the TREE'
|
||||||
def read(tree)
|
def read(tree)
|
||||||
exit if verify_tree(tree)
|
exit unless verify_tree(tree)
|
||||||
puts 'Welcome to Sapling, a Dialogue Tree Utility.'
|
puts 'Welcome to Sapling, a Dialogue Tree Utility.'
|
||||||
speaker = Dialogue::Speaker.new(YAML.load_file(tree), false)
|
speaker = Dialogue::Speaker.new(YAML.load_file(tree), false)
|
||||||
speaker.conversation
|
speaker.conversation
|
||||||
|
@ -41,5 +41,3 @@ class Sapling < Thor
|
||||||
puts 'Cool feature, bro!'
|
puts 'Cool feature, bro!'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Sapling.start(ARGV)
|
|
||||||
|
|
Loading…
Reference in a new issue