Class: BitmapCompiler::Core::Output

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

Overview

Output entity

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Output

Returns a new instance of Output.



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

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

Instance Attribute Details

#bitmapObject (readonly)

Returns the value of attribute bitmap.



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

def bitmap
  @bitmap
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

Instance Method Details



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

def print
  return unless message

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