Sha256: e720b2026a7d4e43c6010c6b2c674bf2b7072965ba7129289c5d740446b9579a

Contents?: true

Size: 764 Bytes

Versions: 1

Compression:

Stored size: 764 Bytes

Contents

module Shellplay
  class Screen

    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']
      @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
      }
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shellplay-0.0.4 lib/shellplay/screen.rb