Skip to content

Class Attribute Rules

Andrias Meisyal edited this page Apr 30, 2017 · 1 revision

The current version of staruml-ruby supports these class attribute rules:

  1. If an attribute is set to no readonly and no static, an instance variable is generated and uses attr_accessor :attribute_name.
  2. If an attribute is set to readonly and no static, an instance variable is generated and uses attr_reader :attribute_name.
  3. If an attribute is set to no readonly and static, a class variable is generated and uses @@attribute_name =.
  4. If an attribute is set to readonly and static, a constant is generated and uses ATTRIBUTE_NAME=.
Clone this wiki locally