Skip to content
Browse files

Prefixed private methods to prevent conflicts.

  • Loading branch information...
1 parent 3395b2b commit 19401bf0fa877d6366b29a7cc6555106eafb58fd @RichGuk RichGuk committed Aug 10, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/virtus/class_methods.rb
View
8 lib/virtus/class_methods.rb
@@ -44,8 +44,8 @@ def self.extended(descendant)
# @api public
def attribute(name, type, options = {})
attribute = Attribute.determine_type(type).new(name, options)
- define_attribute_methods(attribute)
- add_attribute(attribute)
+ virtus_define_attribute_methods(attribute)
+ virtus_add_attribute(attribute)
self
end
@@ -98,7 +98,7 @@ def const_missing(name)
# @return [undefined]
#
# @api private
- def define_attribute_methods(attribute)
+ def virtus_define_attribute_methods(attribute)
attribute.define_reader_method(self)
attribute.define_writer_method(self)
include self::AttributeMethods
@@ -111,7 +111,7 @@ def define_attribute_methods(attribute)
# @return [undefined]
#
# @api private
- def add_attribute(attribute)
+ def virtus_add_attribute(attribute)
attributes << attribute
descendants.each { |descendant| descendant.attributes.reset }
end

0 comments on commit 19401bf

Please sign in to comment.
Something went wrong with that request. Please try again.