From 5fb3625a0656a650b13d911223540276d684fa49 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 24 Oct 2017 01:16:24 +0100 Subject: [PATCH] Use method notation instead of hash notation for accessing options --- examples/application-example/lib/foobar/ping_consumer.rb | 4 ++-- examples/application-example/lib/foobar/pong_consumer.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/application-example/lib/foobar/ping_consumer.rb b/examples/application-example/lib/foobar/ping_consumer.rb index e292ae0..1f6a862 100644 --- a/examples/application-example/lib/foobar/ping_consumer.rb +++ b/examples/application-example/lib/foobar/ping_consumer.rb @@ -18,8 +18,8 @@ module Foobar publish('ping-pong', 'PONG', routing_key: 'pong') message.ack - return unless options[:success_message] - logger.info("#{self.class}: #{options[:success_message]}") + return unless options.success_message + logger.info("#{self.class}: #{options.success_message}") end end end diff --git a/examples/application-example/lib/foobar/pong_consumer.rb b/examples/application-example/lib/foobar/pong_consumer.rb index ec766bc..b353be8 100644 --- a/examples/application-example/lib/foobar/pong_consumer.rb +++ b/examples/application-example/lib/foobar/pong_consumer.rb @@ -18,8 +18,8 @@ module Foobar publish('ping-pong', 'PING', routing_key: 'ping') message.ack - return unless options[:success_message] - logger.info("#{self.class}: #{options[:success_message]}") + return unless options.success_message + logger.info("#{self.class}: #{options.success_message}") end end end