Skip to content

Commit

Permalink
version 0.1.6 (refactored)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffp committed Jul 15, 2009
1 parent f1045e0 commit 2a4d782
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 3 additions & 1 deletion README.rdoc
Expand Up @@ -349,7 +349,9 @@ overwriting the plugin's methods. The best approach is shown here:
def self.new(*args)
...
end
def self.method_missing(methId, *args, &blk)

private
def method_missing(methId, *args, &blk)
...
end

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -2,7 +2,7 @@
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/contrib/sshpublisher'

spec = Gem::Specification.new do |s|
s.name = 'enumerated_attribute'
s.version = '0.1.6'
Expand Down
6 changes: 0 additions & 6 deletions lib/enumerated_attribute.rb
Expand Up @@ -12,12 +12,6 @@ class << self
end
alias_method :enum_attr, :enumerated_attribute

#these implementations are for basic ruby objects - integrations (see Integrations::ActiveRecord and Integrations::Object) may alter them
#def define_enumerated_attribute_custom_method(symbol, attr_name, value, negated)
#private
#def define_enumerated_attribute_new_method
#def define_enumerated_attribute_writer_method name
#def define_enumerated_attribute_reader_method name
end

end
Expand Down
12 changes: 8 additions & 4 deletions lib/enumerated_attribute/attribute.rb
Expand Up @@ -9,9 +9,7 @@ class InvalidEnumeration < EnumeratedAttributeError; end
class InvalidDefinition < EnumeratedAttributeError; end

module Attribute
# def included(klass); klass.extend(ClassMethods); end

# module ClassMethods

private
def create_enumerated_attribute(*args, &block)
return if args.empty?
Expand Down Expand Up @@ -203,6 +201,12 @@ def self.define_enumerated_attribute_custom_method(symbol, attr_name, value, neg

end
end
#end

#these methods are called by create_enumerated_attribute but defined by the integration (see Integrations::ActiveRecord and Integrations::Object) may alter them
#def define_enumerated_attribute_custom_method(symbol, attr_name, value, negated)
#private
#def define_enumerated_attribute_new_method
#def define_enumerated_attribute_writer_method name
#def define_enumerated_attribute_reader_method name

end

0 comments on commit 2a4d782

Please sign in to comment.