Sha256: c9ffd09d2a8e184884be8fbf579cc38fed92081f3e58558ebbad27bcdfed08e9

Contents?: true

Size: 251 Bytes

Versions: 3

Compression:

Stored size: 251 Bytes

Contents

module Zunnit
	module Utils 
		def mattr_accessor *attrs 
			attrs.each do |attr|
				module_eval %[
				def self.#{attr.to_s}=(value)
					@#{attr.to_s} = value
				end

				def self.#{attr.to_s}
					@#{attr.to_s}
				end
				]
			end
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zunnit-0.2.0 lib/zunnit/utils.rb
zunnit-0.1.1 lib/zunnit/utils.rb
zunnit-0.1.0 lib/zunnit/utils.rb