官术网_书友最值得收藏!

Using the encapsulation principle

As far as possible, these classes should use encapsulation to hide the implementation details from the user; for example, users of your module don't need to be aware of individual resource names. In software engineering, we call this encapsulation. For example, in a config class, we can use several resources, but the user doesn't need to know all about them. Rather, they just simply know that they should use the config class for the configuration of the software to work correctly.

Having classes contain other classes can be very useful, especially in larger modules where you want to improve code readability. You can move chunks of functionality into separate files, and then use the contain keyword to refer to these separated chunks of functionality.

See https://puppet.com/docs/puppet/5.3/lang_containment.html website for a reminder about the contain keyword.
主站蜘蛛池模板: 汽车| 图们市| 余江县| 德阳市| 宁德市| 塔城市| 克东县| 襄樊市| 江北区| 德江县| 华安县| 长白| 杭州市| 商城县| 信宜市| 松潘县| 普宁市| 夏邑县| 全椒县| 丽江市| 日照市| 当涂县| 咸阳市| 朝阳县| 长武县| 彝良县| 鄂伦春自治旗| 慈溪市| 若尔盖县| 安达市| 儋州市| 阜新市| 德庆县| 道孚县| 勐海县| 神木县| 延寿县| 大足县| 和政县| 辽阳市| 大荔县|