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:
Bill Niblock 2017-10-14 22:34:21 -04:00
parent a37b089074
commit 7a7f06485f

View file

@ -3,13 +3,13 @@
require 'thor'
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.
class Sapling < Thor
desc 'read TREE', 'Load and traverse the TREE'
def read(tree)
exit if verify_tree(tree)
exit unless verify_tree(tree)
puts 'Welcome to Sapling, a Dialogue Tree Utility.'
speaker = Dialogue::Speaker.new(YAML.load_file(tree), false)
speaker.conversation
@ -41,5 +41,3 @@ class Sapling < Thor
puts 'Cool feature, bro!'
end
end
Sapling.start(ARGV)