Class: Kiqit::PayloadHelper
- Inherits:
-
Object
- Object
- Kiqit::PayloadHelper
- Defined in:
- lib/kiqit/payload_helper.rb
Class Method Summary collapse
-
.get_digest(klass, method, *args) ⇒ Object
Public: Get Digest for the loner key.
Class Method Details
.get_digest(klass, method, *args) ⇒ Object
Public: Get Digest for the loner key.
klass - Class name. method - Method name. Args - Args to send on the method
Examples =>
PayloadHelper.get_digest("SomeClass", "some_method", "arg1", "arg2")
12 13 14 15 16 17 18 |
# File 'lib/kiqit/payload_helper.rb', line 12 def self.get_digest(klass, method, *args) args = args.flatten payload = { :class => klass, :method => method.to_s, :args => args }.to_s digest = Digest::MD5.hexdigest("#{payload}") "loner:#{digest}" end |