class Sesc::Exporter::Printer
Attributes
down[RW]
text[RW]
up[RW]
Public Class Methods
new(text, params = {})
click to toggle source
# File lib/sesc/exporter/printer.rb, line 8 def initialize(text, params = {}) self.text = text self.up = params.fetch(:up, 0) self.down = params.fetch(:down, 0) end
Public Instance Methods
terminal()
click to toggle source
# File lib/sesc/exporter/printer.rb, line 14 def terminal puts output unless ENV['DISABLE_OUTPUT'] end
Private Instance Methods
colorize()
click to toggle source
# File lib/sesc/exporter/printer.rb, line 24 def colorize text end
down_blank_lines()
click to toggle source
# File lib/sesc/exporter/printer.rb, line 32 def down_blank_lines "\n" * down end
output()
click to toggle source
# File lib/sesc/exporter/printer.rb, line 20 def output up_blank_lines + colorize + down_blank_lines end
up_blank_lines()
click to toggle source
# File lib/sesc/exporter/printer.rb, line 28 def up_blank_lines "\n" * up end