enumerated_attribute 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,19 +3,19 @@ module EnumeratedAttribute
3
3
  module InstanceMethods
4
4
  def self.included(base)
5
5
 
6
- method_missing_suffix = "enumerated_attribute_#{base.name.gsub(/^.+>::/,'')}_#{base.hash.abs}".to_sym
6
+ method_missing_suffix = "enumerated_attribute_#{base.name.gsub(/.+::/,'')}_#{base.hash.abs}".to_sym
7
7
  define_method("method_missing_with_#{method_missing_suffix}") do |methId, *args|
8
8
  return self.__send__(methId) if define_enumerated_attribute_dynamic_method(methId)
9
9
  self.__send__("method_missing_without_#{method_missing_suffix}", methId, *args)
10
10
  end
11
11
 
12
- respond_to_suffix = "enumerated_attribute_#{base.name.gsub(/^.+>::/,'')}_#{base.hash.abs}".to_sym
12
+ respond_to_suffix = "enumerated_attribute_#{base.name.gsub(/.+::/,'')}_#{base.hash.abs}".to_sym
13
13
  base.class_eval %{
14
14
  def respond_to_with_#{respond_to_suffix}?(method, include_private=false)
15
15
  self.respond_to_without_#{respond_to_suffix}?(method, include_private) ||
16
16
  (!!parse_dynamic_method_parts!(method.to_s) rescue false)
17
17
  end
18
- }
18
+ }, __FILE__, __LINE__
19
19
 
20
20
  base.safe_alias_method_chain :method_missing, method_missing_suffix
21
21
  base.safe_alias_method_chain :respond_to?, respond_to_suffix
@@ -88,7 +88,7 @@ module EnumeratedAttribute
88
88
  def define_enumerated_attribute_new_method
89
89
  class_eval do
90
90
  class << self
91
- unless method_defined?(:new_without_enumerated_attribute)
91
+ unless method_defined?(:new_without_enumerated_attribute)
92
92
  alias_method :new_without_enumerated_attribute, :new
93
93
  def new(*args, &block)
94
94
  result = new_without_enumerated_attribute(*args, &block)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 10
9
- version: 0.2.10
8
+ - 11
9
+ version: 0.2.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeff Patmon
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-24 00:00:00 -07:00
17
+ date: 2010-05-28 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -40,7 +40,6 @@ extensions: []
40
40
  extra_rdoc_files: []
41
41
 
42
42
  files:
43
- - lib/jeffp-enumerated_attribute.rb
44
43
  - lib/enumerated_attribute/rails_helpers.rb
45
44
  - lib/enumerated_attribute/integrations/datamapper.rb
46
45
  - lib/enumerated_attribute/integrations/default.rb
@@ -1 +0,0 @@
1
- require 'enumerated_attribute'