method

attribute

Importance_1
v7.2.3 - Show latest stable - 0 notes - Class: CurrentAttributes
attribute(*names, default: NOT_SET) public

Declares one or more attributes that will be given both class and instance accessor methods.

Options

  • :default - The default value for the attributes. If the value is a proc or lambda, it will be called whenever an instance is constructed. Otherwise, the value will be duplicated with #dup. Default values are re-assigned when the attributes are reset.

Show source
Register or log in to add new notes.