Class: Ikibana::ApplicationConsumer

Inherits:
Object
  • Object
show all
Defined in:
lib/ikibana/application_consumer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplicationConsumer

Returns a new instance of ApplicationConsumer.



12
13
14
15
# File 'lib/ikibana/application_consumer.rb', line 12

def initialize
  super
  ObjectSpace.define_finalizer(self, self.class.method(:destructor).to_proc)
end

Class Method Details

.callObject



17
18
19
# File 'lib/ikibana/application_consumer.rb', line 17

def self.call
  new.call
end

Instance Method Details

#callObject



21
22
23
24
25
26
# File 'lib/ikibana/application_consumer.rb', line 21

def call
  return if locked?
  return run_in_sync if sync?

  run_async
end