Writing custom functions in Ruby You can write powerful and flexible functions using Ruby. Custom functions in Ruby overviewGet started with an overview of Ruby custom functions. Ruby function signaturesFunctions can specify how many arguments they expect, and a data type for each argument. The rule set for a function’s arguments is called a signature. Using special features in implementation methodsFor the most part, implementation methods are normal Ruby. However, there are some special features available for accessing Puppet variables, working with provided blocks of Puppet code, and calling other functions. Iterative functionsYou can use iterative types to write efficient iterative functions, or to chain together the iterative functions built into Puppet. Refactoring legacy 3.x functionsIf you have Ruby functions written with the legacy 3.x API, refactor them to ensure that they work correctly with current versions of Puppet.