Skip to content

Commit 3190cce

Browse files
committed
Clean up method declaration punctuation consistency.
1 parent e139fd6 commit 3190cce

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/rabbitmq/ffi/error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module RabbitMQ
33
module FFI
44

55
class Error < RuntimeError
6-
def initialize message=nil
6+
def initialize(message=nil)
77
@message = message
88
end
99

lib/rabbitmq/util.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ def const_name(lowercase_name)
1010
lowercase_name.to_s.gsub(/((?:\A\w)|(?:_\w))/) { |x| x[-1].upcase }
1111
end
1212

13-
def error_check action, status
13+
def error_check(action, status)
1414
return if status == :ok
1515
raise RabbitMQ::FFI::Error.lookup(status), "while #{action}"
1616
end
1717

18-
def null_check action, obj
18+
def null_check(action, obj)
1919
return unless obj.nil?
2020
raise RabbitMQ::FFI::Error, "while #{action} - got unexpected null"
2121
end
2222

23-
def mem_ptr size, count: 1, clear: true, release: true
23+
def mem_ptr(size, count: 1, clear: true, release: true)
2424
ptr = ::FFI::MemoryPointer.new(size, count, clear)
2525
ptr.autorelease = false unless release
2626
ptr
2727
end
2828

29-
def strdup_ptr str, **kwargs
29+
def strdup_ptr(str, **kwargs)
3030
str = str + "\x00"
3131
ptr = mem_ptr(str.bytesize, **kwargs)
3232
ptr.write_string(str)
3333
ptr
3434
end
3535

36-
def connection_info url=nil, **overrides
36+
def connection_info(url=nil, **overrides)
3737
info = FFI::ConnectionInfo.new
3838
FFI.amqp_default_connection_info(info)
3939
result = info.to_h

0 commit comments

Comments
 (0)