From 4c726b079d71db604775e3b70e70c423420503ff Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Sat, 13 May 2017 19:42:42 -0400 Subject: [PATCH] sapling.rb: Modify start options - Reduce some LOC by moving some assignments into the initialize functions of both Dialogue and Planter --- lib/sapling.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/sapling.rb b/lib/sapling.rb index c80903f..254b35e 100644 --- a/lib/sapling.rb +++ b/lib/sapling.rb @@ -41,8 +41,7 @@ module Sapling end puts "Welcome to Sapling, a Dialogue Tree Utility.\n" - speaker = Dialogue::Speaker.new - speaker.file = YAML.load_file(ARGV[0]) + speaker = Dialogue::Speaker.new(YAML.load_file(ARGV[0]),false) speaker.conversation end @@ -62,8 +61,7 @@ module Sapling end puts "Welcome to Sapling, a Dialogue Tree Utility.\n" - gardner = Planter::Spade.new - gardner.file = tree + gardner = Planter::Spade.new(tree) gardner.plant end