class Rohbau::Application::RuntimeWrapper

Public Class Methods

new(*ignored_args) click to toggle source
# File lib/rohbau/application.rb, line 11
def self.new(*ignored_args)
  @constructor.call
end
set_constructor(constructor) click to toggle source
# File lib/rohbau/application.rb, line 6
def self.set_constructor(constructor)
  @constructor = constructor
  self
end
wrap(&constructor) click to toggle source
# File lib/rohbau/application.rb, line 4
def self.wrap(&constructor)
  wrapper = Class.new do
    def self.set_constructor(constructor)
      @constructor = constructor
      self
    end

    def self.new(*ignored_args)
      @constructor.call
    end
  end

  wrapper.set_constructor(constructor)
end