lib/shellplay/screen.rb in shellplay-0.1.6 vs lib/shellplay/screen.rb in shellplay-0.1.7

- old
+ new

@@ -1,5 +1,6 @@ +# class for the screen object module Shellplay class Screen attr_reader :stdin, :stdout, :stderr, :display, :timespent, :displaycommand, :playprompt, :clearscreen, :customprompt @@ -12,10 +13,11 @@ @stdout = nil @stderr = nil @timespent = 0 end + # transforms a hash into a screen object def import(hash) @displaycommand = !!hash['displaycommand'] @playprompt = !!hash['playprompt'] @clearscreen = !!hash['clearscreen'] @customprompt = hash['customprompt'] @@ -23,9 +25,10 @@ @stdout = hash['stdout'] @stderr = hash['stderr'] @timespent = hash['timespent'] end + # transfroms a screen object into a hash def export { displaycommand: @displaycommand, playprompt: @playprompt, clearscreen: @clearscreen,