Sha256: c426f1bac852f6bc3f7e1e4f4f7f3a25e6942429028b0fe3e365a8319955cb59

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

require "activity_engine/engine"
require 'activity_engine/context_builder'
require 'activity_engine/activity_builder'

module ActivityEngine
  module_function

  def register(class_name, method_name, activity_receiver = ActivityEngine::Activity, &config_block)
    context_builder = ContextBuilder.new(class_name, method_name)
    activity_builder = ActivityBuilder.new(activity_receiver, config_block)
    context_builder.wrap!(activity_builder)
  end

  def extract_subject_id(object)
    Array(object.to_key).join(":")
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activity_engine-0.0.5 lib/activity_engine.rb