Class: BitmapCompiler::Core::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/bitmap_compiler/core/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Output

Returns a new instance of Output.



8
9
10
11
# File 'lib/bitmap_compiler/core/output.rb', line 8

def initialize(args = {})
  @bitmap = args[:bitmap]
  @message = args[:message]
end

Instance Attribute Details

#bitmapObject (readonly)

Returns the value of attribute bitmap.



6
7
8
# File 'lib/bitmap_compiler/core/output.rb', line 6

def bitmap
  @bitmap
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/bitmap_compiler/core/output.rb', line 6

def message
  @message
end

Instance Method Details



13
14
15
16
17
18
# File 'lib/bitmap_compiler/core/output.rb', line 13

def print
  return unless message

  $stdout.write message.chomp ''
  $stdout.write "\n"
end