Sha256: 4640293906fcf1492d09c622c6141ad62b23f73144e0b52b68b52f8cdcdec4a9

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

gem 'meta_programming', '>= 0.2.0'
require 'meta_programming'
require 'enumerated_attribute/attribute'

module EnumeratedAttribute

	module MacroMethods
		
		def enumerated_attribute(*args, &block)
			class << self
				include EnumeratedAttribute::Attribute
			end
			create_enumerated_attribute(*args, &block)
		end
		alias_method :enum_attr, :enumerated_attribute
		
	end
	
end

Class.class_eval do
  include EnumeratedAttribute::MacroMethods
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
edave-enumerated_attribute-0.2.18 lib/enumerated_attribute.rb
enumerated_attribute-0.2.16 lib/enumerated_attribute.rb
enumerated_attribute-0.2.13 lib/enumerated_attribute.rb
enumerated_attribute-0.2.12 lib/enumerated_attribute.rb
enumerated_attribute-0.2.11 lib/enumerated_attribute.rb
enumerated_attribute-0.2.10 lib/enumerated_attribute.rb
enumerated_attribute-0.2.8 lib/enumerated_attribute.rb
enumerated_attribute-0.2.7 lib/enumerated_attribute.rb