aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-05-17 17:19:57 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-05-17 17:46:12 +0530
commita3dd7a4f735374928e28709b2a09dcabe0d9df0c (patch)
tree078aeedcd1cdeb44241f03e15d007ac2be55eb53 /activesupport/lib/active_support/core_ext/object
parentb71a90060fb94709cceb3b2d80c3de6fd12a6e22 (diff)
downloadrails-a3dd7a4f735374928e28709b2a09dcabe0d9df0c.tar.gz
rails-a3dd7a4f735374928e28709b2a09dcabe0d9df0c.tar.bz2
rails-a3dd7a4f735374928e28709b2a09dcabe0d9df0c.zip
copy edit and remove nodoc on instance_values method [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object')
-rw-r--r--activesupport/lib/active_support/core_ext/object/instance_variables.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/instance_variables.rb b/activesupport/lib/active_support/core_ext/object/instance_variables.rb
index 3f310143aa..40821fd619 100644
--- a/activesupport/lib/active_support/core_ext/object/instance_variables.rb
+++ b/activesupport/lib/active_support/core_ext/object/instance_variables.rb
@@ -1,6 +1,6 @@
class Object
- # Returns a hash that maps instance variable names without "@" to their
- # corresponding values. Keys are strings.
+ # Returns a hash with string keys that maps instance variable names without "@" to their
+ # corresponding values.
#
# class C
# def initialize(x, y)
@@ -9,11 +9,11 @@ class Object
# end
#
# C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}
- def instance_values #:nodoc:
+ def instance_values
Hash[instance_variables.map { |name| [name[1..-1], instance_variable_get(name)] }]
end
- # Returns an array of instance variable names including "@". They are strings.
+ # Returns an array of instance variable names including "@".
#
# class C
# def initialize(x, y)