Sha256: 42648181ac8ce480c562dc980b3da51b8c451b0b3b837078bee2881150fe381d

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

module Emittance
  module Watcher
    def watch(identifier, callback_method = nil, &callback)
      if callback_method
        Emittance::Dispatcher.register_method_call identifier, self, callback_method
      else
        Emittance::Dispatcher.register identifier, &callback
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
emittance-0.0.2 lib/emittance/watcher.rb