X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fmodule%2Fattr_internal.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fmodule%2Fattr_internal.rb;h=0000000000000000000000000000000000000000;hb=36d9f3351a3b4e8159279445190e2287ffdea86c;hp=b66c0d75005b00820798a3a5ddfffd44a32b54c5;hpb=913cf6054b1d29b5d2f5e620304af7ee77cc1f1f;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb b/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb deleted file mode 100644 index b66c0d7..0000000 --- a/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Module - # Declares an attribute reader backed by an internally-named instance variable. - def attr_internal_reader(*attrs) - attrs.each do |attr| - module_eval "def #{attr}() #{attr_internal_ivar_name(attr)} end" - end - end - - # Declares an attribute writer backed by an internally-named instance variable. - def attr_internal_writer(*attrs) - attrs.each do |attr| - module_eval "def #{attr}=(v) #{attr_internal_ivar_name(attr)} = v end" - end - end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - def attr_internal_accessor(*attrs) - attr_internal_reader(*attrs) - attr_internal_writer(*attrs) - end - - alias_method :attr_internal, :attr_internal_accessor - - private - mattr_accessor :attr_internal_naming_format - self.attr_internal_naming_format = '@_%s' - - def attr_internal_ivar_name(attr) - attr_internal_naming_format % attr - end -end