Class: Sesc::Exporter::Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/sesc/exporter/printer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, params = {}) ⇒ Printer

Returns a new instance of Printer.



8
9
10
11
12
# 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

Instance Attribute Details

#downObject

Returns the value of attribute down.



6
7
8
# File 'lib/sesc/exporter/printer.rb', line 6

def down
  @down
end

#textObject

Returns the value of attribute text.



6
7
8
# File 'lib/sesc/exporter/printer.rb', line 6

def text
  @text
end

#upObject

Returns the value of attribute up.



6
7
8
# File 'lib/sesc/exporter/printer.rb', line 6

def up
  @up
end

Instance Method Details

#terminalObject



14
15
16
# File 'lib/sesc/exporter/printer.rb', line 14

def terminal
  puts output unless ENV['DISABLE_OUTPUT']
end