Module: Startback::Audit::Shared

Included in:
Prometheus, Trailer
Defined in:
lib/startback/audit/shared.rb

Instance Method Summary collapse

Instance Method Details

#op_name(op) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/startback/audit/shared.rb', line 5

def op_name(op)
  return op.op_name if op.respond_to?(:op_name)

  case op
  when String then op
  when Class  then op.name
  else op.class.name
  end
end