Skip to content
Browse files

copy editing AS guide [ci skip]

  • Loading branch information...
1 parent 52efeaa commit 09191d5df6af9f73eeb1ddd786e32f77e1066007 @vijaydev vijaydev committed Jun 14, 2013
Showing with 4 additions and 19 deletions.
  1. +4 −19 guides/source/active_support_core_extensions.md
View
23 guides/source/active_support_core_extensions.md
@@ -420,9 +420,9 @@ NOTE: Defined in `active_support/core_ext/object/with_options.rb`.
### JSON support
-Active Support provides a better implemention of `to_json` than the json gem ordinarily provides for Ruby objects. This is because some classes, like Hash and OrderedHash, needs special handling in order to provide a proper JSON representation.
+Active Support provides a better implemention of `to_json` than the +json+ gem ordinarily provides for Ruby objects. This is because some classes, like +Hash+ and +OrderedHash+ needs special handling in order to provide a proper JSON representation.
-Active Support also provides an implementation of `as_json` for the Process::Status class.
+Active Support also provides an implementation of `as_json` for the <tt>Process::Status</tt> class.
NOTE: Defined in `active_support/core_ext/object/to_json.rb`.
@@ -447,23 +447,6 @@ C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}
NOTE: Defined in `active_support/core_ext/object/instance_variables.rb`.
-#### `instance_values`
-
-The method `instance_values` returns a hash that maps instance variable names without "@" to their
-corresponding values. Keys are strings:
-
-```ruby
-class C
- def initialize(x, y)
- @x, @y = x, y
- end
-end
-
-C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}
-```
-
-NOTE: Defined in `active_support/core_ext/object/instance_variables.rb`.
-
#### `instance_variable_names`
The method `instance_variable_names` returns an array. Each name includes the "@" sign.
@@ -2053,13 +2036,15 @@ NOTE: Defined in `active_support/core_ext/integer/inflections.rb`.
Extensions to `BigDecimal`
--------------------------
### `to_s`
+
The method `to_s` is aliased to `to_formatted_s`. This provides a convenient way to display a BigDecimal value in floating-point notation:
```ruby
BigDecimal.new(5.00, 6).to_s # => "5.0"
```
### `to_formatted_s`
+
Te method `to_formatted_s` provides a default specifier of "F". This means that a simple call to `to_formatted_s` or `to_s` will result in floating point representation instead of engineering notation:
```ruby

0 comments on commit 09191d5

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