From 0d3f4d41cedc59c4b3cf000f0e05bc1245be8ad3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 23 Feb 2011 15:21:55 -0800 Subject: unindent class methods No need to waste indentation and make eyes wander. --- lib/posix_mq.rb | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'lib') diff --git a/lib/posix_mq.rb b/lib/posix_mq.rb index e07fe1f..02a646d 100644 --- a/lib/posix_mq.rb +++ b/lib/posix_mq.rb @@ -12,19 +12,16 @@ class POSIX_MQ # See the mq_getattr(3) manpage for more information on the values. Attr = Struct.new(:flags, :maxmsg, :msgsize, :curmsgs) - class << self - - # Opens a POSIX message queue and performs operations on the - # given block, closing the message queue at exit. - # All all arguments are passed to POSIX_MQ.new. - def open(*args) - mq = new(*args) - block_given? or return mq - begin - yield mq - ensure - mq.close unless mq.closed? - end + # Opens a POSIX message queue and performs operations on the + # given block, closing the message queue at exit. + # All all arguments are passed to POSIX_MQ.new. + def self.open(*args) + mq = new(*args) + block_given? or return mq + begin + yield mq + ensure + mq.close unless mq.closed? end end -- cgit v1.2.3-24-ge0c7