Module: ActiveCrew::Extender

Defined in:
lib/active_crew/extender.rb

Instance Method Summary collapse

Instance Method Details

#command(name, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/active_crew/extender.rb', line 7

def command(name, options = {})
  context = { options: options }
  context[:session] = request.headers['x-session-token'] if respond_to? :request

  ActiveCrew::Backends.enqueue name, current_user, context.merge(command_context)
end

#command_contextObject



3
4
5
# File 'lib/active_crew/extender.rb', line 3

def command_context
  @command_context ||= {}
end