Skip to content
This repository
Browse code

copy editing AS guide [ci skip]

  • Loading branch information...
commit 09191d5df6af9f73eeb1ddd786e32f77e1066007 1 parent 52efeaa
Vijay Dev vijaydev authored

Showing 1 changed file with 4 additions and 19 deletions. Show diff stats Hide diff stats

  1. +4 19 guides/source/active_support_core_extensions.md
23 guides/source/active_support_core_extensions.md
Source Rendered
@@ -420,9 +420,9 @@ NOTE: Defined in `active_support/core_ext/object/with_options.rb`.
420 420
421 421 ### JSON support
422 422
423   -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.
  423 +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.
424 424
425   -Active Support also provides an implementation of `as_json` for the Process::Status class.
  425 +Active Support also provides an implementation of `as_json` for the <tt>Process::Status</tt> class.
426 426
427 427 NOTE: Defined in `active_support/core_ext/object/to_json.rb`.
428 428
@@ -447,23 +447,6 @@ C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}
447 447
448 448 NOTE: Defined in `active_support/core_ext/object/instance_variables.rb`.
449 449
450   -#### `instance_values`
451   -
452   -The method `instance_values` returns a hash that maps instance variable names without "@" to their
453   -corresponding values. Keys are strings:
454   -
455   -```ruby
456   -class C
457   - def initialize(x, y)
458   - @x, @y = x, y
459   - end
460   -end
461   -
462   -C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}
463   -```
464   -
465   -NOTE: Defined in `active_support/core_ext/object/instance_variables.rb`.
466   -
467 450 #### `instance_variable_names`
468 451
469 452 The method `instance_variable_names` returns an array. Each name includes the "@" sign.
@@ -2053,6 +2036,7 @@ NOTE: Defined in `active_support/core_ext/integer/inflections.rb`.
2053 2036 Extensions to `BigDecimal`
2054 2037 --------------------------
2055 2038 ### `to_s`
  2039 +
2056 2040 The method `to_s` is aliased to `to_formatted_s`. This provides a convenient way to display a BigDecimal value in floating-point notation:
2057 2041
2058 2042 ```ruby
@@ -2060,6 +2044,7 @@ BigDecimal.new(5.00, 6).to_s # => "5.0"
2060 2044 ```
2061 2045
2062 2046 ### `to_formatted_s`
  2047 +
2063 2048 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:
2064 2049
2065 2050 ```ruby

0 comments on commit 09191d5

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