Permalink
Browse files

Whitespace.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 288e947 commit d3ccfe414d8f2d5058cdbc3fe7484af12dd3d05b @clemens clemens committed with jeremy Sep 2, 2008
Showing with 5 additions and 5 deletions.
  1. +5 −5 activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
View
10 activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -91,14 +91,14 @@ def class_inheritable_hash(*syms)
def inheritable_attributes
@inheritable_attributes ||= EMPTY_INHERITABLE_ATTRIBUTES
end
-
+
def write_inheritable_attribute(key, value)
if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
@inheritable_attributes = {}
end
inheritable_attributes[key] = value
end
-
+
def write_inheritable_array(key, elements)
write_inheritable_attribute(key, []) if read_inheritable_attribute(key).nil?
write_inheritable_attribute(key, read_inheritable_attribute(key) + elements)
@@ -112,7 +112,7 @@ def write_inheritable_hash(key, hash)
def read_inheritable_attribute(key)
inheritable_attributes[key]
end
-
+
def reset_inheritable_attributes
@inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
end
@@ -123,15 +123,15 @@ def reset_inheritable_attributes
def inherited_with_inheritable_attributes(child)
inherited_without_inheritable_attributes(child) if respond_to?(:inherited_without_inheritable_attributes)
-
+
if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
else
new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)|
memo.update(key => value.duplicable? ? value.dup : value)
end
end
-
+
child.instance_variable_set('@inheritable_attributes', new_inheritable_attributes)
end

0 comments on commit d3ccfe4

Please sign in to comment.