Class: Uttk::Logger::Upper

Inherits:
Object show all
Defined in:
lib/uttk/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Upper

Returns a new instance of Upper.



146
147
148
149
# File 'lib/uttk/logger.rb', line 146

def initialize ( &block )
  @called = false
  @block = block
end

Instance Method Details

#upObject Also known as: call, []



150
151
152
153
154
# File 'lib/uttk/logger.rb', line 150

def up
  return if @called
  @called = true
  @block[]
end