meisyal / staruml-ruby

A Ruby extension for StarUML.
https://staruml.io/extensions
MIT License
26 stars 1 forks source link

Class attribute rules #2

Closed meisyal closed 7 years ago

meisyal commented 7 years ago

The current version of staruml-ruby (0.1.4) 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 constant is generated.

In the future release, there are some modification for those rules:

  1. A constant is generated if the attribute is set to readonly and static.
  2. A class variable, @@attribute_name, is generated if the attribute is set to no readonly and static
meisyal commented 7 years ago

This feature has been implemented in release 0.1.5.