فهرست منبع

Better class comment for Setting

Nicolas Petton 10 سال پیش
والد
کامیت
105a3b3041
2فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 1 1
      js/Kernel-Infrastructure.js
  2. 4 2
      st/Kernel-Infrastructure.st

+ 1 - 1
js/Kernel-Infrastructure.js

@@ -2341,7 +2341,7 @@ globals.Transcript.klass);
 
 
 smalltalk.addClass('Setting', globals.Object, ['key', 'value', 'defaultValue'], 'Kernel-Infrastructure');
-globals.Setting.comment="I represent a setting accessible via `Smalltalk settings`.\x0a\x0aYou can read the value by `value` and set it by `value:`.\x0a\x0aConstruct me by: `'key' asSetting` or `'key' asSettingIfAbsent: 'defaultValue'`.";
+globals.Setting.comment="I represent a setting accessible via `Smalltalk settings`.\x0a\x0a## API\x0a\x0aa `Setting` value can be read using `value` and set using `value:`.\x0a\x0aSettings are accessed with `'key' asSetting` or `'key' asSettingIfAbsent: 'defaultValue'`.";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "defaultValue",

+ 4 - 2
st/Kernel-Infrastructure.st

@@ -915,9 +915,11 @@ Object subclass: #Setting
 !Setting commentStamp!
 I represent a setting accessible via `Smalltalk settings`.
 
-You can read the value by `value` and set it by `value:`.
+## API
+
+a `Setting` value can be read using `value` and set using `value:`.
 
-Construct me by: `'key' asSetting` or `'key' asSettingIfAbsent: 'defaultValue'`.!
+Settings are accessed with `'key' asSetting` or `'key' asSettingIfAbsent: 'defaultValue'`.!
 
 !Setting methodsFor: 'accessing'!