Sha256: 3a0940b7d106cd653585b993cf0cdd0da36888585fd691b0cdb10f1d4e79a57c

Contents?: true

Size: 286 Bytes

Versions: 2

Compression:

Stored size: 286 Bytes

Contents

module TP
  class Renderer
    attr_reader :text

    def initialize(text)
      @text = text
    end

    def render
      Screen.clear!

      return unless text

      print text unless testing?

      true
    end

    def testing?
      ENV['RUBY_ENV'] == 'test'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tp-0.4.1 lib/tp/renderer.rb
tp-0.4.0 lib/tp/renderer.rb