Module: LogWeasel::Resque::Job

Defined in:
lib/log_weasel/resque.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



53
54
55
56
# File 'lib/log_weasel/resque.rb', line 53

def self.included(base)
  base.send :alias_method, :inspect_without_context, :inspect
  base.send :alias_method, :inspect, :inspect_with_context
end

Instance Method Details

#contextObject



45
46
47
# File 'lib/log_weasel/resque.rb', line 45

def context
  @payload['context']
end

#inspect_with_contextObject



49
50
51
# File 'lib/log_weasel/resque.rb', line 49

def inspect_with_context
  inspect_without_context.gsub /\)$/, " | #{context.inspect})"
end