Class: Flexite::Diff::AsyncCheckService

Inherits:
Object
  • Object
show all
Defined in:
app/services/flexite/diff/async_check_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AsyncCheckService

Returns a new instance of AsyncCheckService.



4
5
6
7
# File 'app/services/flexite/diff/async_check_service.rb', line 4

def initialize(*args)
  @args = args
  @handler = Flexite.config.async_diff_handler
end

Instance Method Details

#callObject



9
10
11
12
13
14
15
# File 'app/services/flexite/diff/async_check_service.rb', line 9

def call
  unless @handler.is_a?(Proc)
    raise 'Async handler should be a proc object'
  end

  @handler.call(*@args)
end