lib/keytar/key_builder.rb in keytar-1.3.1 vs lib/keytar/key_builder.rb in keytar-1.4.0
- old
+ new
@@ -10,17 +10,10 @@
def self.included(klass)
# setup method missing on class
klass.class_eval do
extend KeyBuilder::Ext
- def self.method_missing(method_name, *args, &blk)
- if method_name.to_s =~ /.*key$/
- self.build_key(:base => self.to_s.downcase, :name => method_name, :args => args)
- else
- super
- end
- end
end
end
# class methods to be extended
module Ext
@@ -127,17 +120,7 @@
options[:base] = options[:key_plural]||self.class.key_plural||options[:base].pluralize
end
unique = self.send "#{options[:key_unique]||self.class.key_unique}".to_sym
options[:unique] = unique unless unique == object_id
self.class.build_key(options)
- end
-
-
-
- def method_missing(method_name, *args, &blk)
- if method_name.to_s =~ /.*key$/
- build_key(:name => method_name, :args => args)
- else
- super
- end
end
end
\ No newline at end of file