lib/shellplay/screen.rb in shellplay-0.0.3 vs lib/shellplay/screen.rb in shellplay-0.0.4

- old
+ new

@@ -1,28 +1,31 @@ module Shellplay class Screen - attr_reader :stdin, :stdout, :stderr, :display, :timespent, :displaycommand + attr_reader :stdin, :stdout, :stderr, :display, :timespent, :displaycommand, :playprompt def initialize @displaycommand = true + @playprompt = true @stdin = nil @stdout = nil @stderr = nil @timespent = 0 end def import(hash) - @displaycommand = hash['displaycommand'] + @displaycommand = !!hash['displaycommand'] + @playprompt = !!hash['playprompt'] @stdin = hash['stdin'] @stdout = hash['stdout'] @stderr = hash['stderr'] @timespent = hash['timespent'] end def export { displaycommand: @displaycommand, + playprompt: @playprompt, stdin: @stdin, stdout: @stdout, stderr: @stderr, timespent: @timespent }