Class: Sesc::Exporter::Printer
- Inherits:
-
Object
- Object
- Sesc::Exporter::Printer
- Defined in:
- lib/sesc/exporter/printer.rb
Instance Attribute Summary collapse
-
#down ⇒ Object
Returns the value of attribute down.
-
#text ⇒ Object
Returns the value of attribute text.
-
#up ⇒ Object
Returns the value of attribute up.
Instance Method Summary collapse
-
#initialize(text, params = {}) ⇒ Printer
constructor
A new instance of Printer.
- #terminal ⇒ Object
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
#down ⇒ Object
Returns the value of attribute down.
6 7 8 |
# File 'lib/sesc/exporter/printer.rb', line 6 def down @down end |
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/sesc/exporter/printer.rb', line 6 def text @text end |
#up ⇒ Object
Returns the value of attribute up.
6 7 8 |
# File 'lib/sesc/exporter/printer.rb', line 6 def up @up end |
Instance Method Details
#terminal ⇒ Object
14 15 16 |
# File 'lib/sesc/exporter/printer.rb', line 14 def terminal puts output unless ENV['DISABLE_OUTPUT'] end |