[ruby/erb] Fix up some doco on erb

(https://github.com/ruby/erb/pull/56)

* ERB#result: Dropped mention of deprecated safe_level since it is no longer documented.

* Fixed grammar for chicken fried steak :P

https://github.com/ruby/erb/commit/4efd3437ac
This commit is contained in:
Ryan Davis 2024-12-24 13:21:12 -08:00 committed by Hiroshi SHIBATA
parent b7690c58b9
commit 70e90d5276
Notes: git 2024-12-26 01:27:45 +00:00

View File

@ -294,7 +294,7 @@ class ERB
# # build data class # # build data class
# class Listings # class Listings
# PRODUCT = { :name => "Chicken Fried Steak", # PRODUCT = { :name => "Chicken Fried Steak",
# :desc => "A well messages pattie, breaded and fried.", # :desc => "A well messaged pattie, breaded and fried.",
# :cost => 9.95 } # :cost => 9.95 }
# #
# attr_reader :product, :price # attr_reader :product, :price
@ -327,10 +327,10 @@ class ERB
# _Generates_ # _Generates_
# #
# Chicken Fried Steak # Chicken Fried Steak
# A well messages pattie, breaded and fried. # A well massaged pattie, breaded and fried.
# #
# Chicken Fried Steak -- 9.95 # Chicken Fried Steak -- 9.95
# A well messages pattie, breaded and fried. # A well massaged pattie, breaded and fried.
# #
def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout') def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
# Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar. # Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar.
@ -416,8 +416,7 @@ class ERB
# #
# Executes the generated ERB code to produce a completed template, returning # Executes the generated ERB code to produce a completed template, returning
# the results of that code. (See ERB::new for details on how this process # the results of that code.
# can be affected by _safe_level_.)
# #
# _b_ accepts a Binding object which is used to set the context of # _b_ accepts a Binding object which is used to set the context of
# code evaluation. # code evaluation.