Permalink
Browse files

Merge pull request #21 from RichGuk/master

Naming conflicts
  • Loading branch information...
2 parents 3395b2b + 19401bf commit 126b0a394cccce6a4aeac5c7b647f056e007a258 @dkubb dkubb committed Aug 10, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 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 126b0a3

Please sign in to comment.