meisyal / staruml-ruby

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

defaultValue #10

Closed huseyin39 closed 5 years ago

huseyin39 commented 5 years ago

Isn't defaultValue taken into consideration? While creating class and giving a defaultValue to a variable then generating code, defaultValue is not assigned within the code. Example:

class Test def initialize(variable) @variable = variable

instead of class Test def initialize(variable: 0) @variable = variable

meisyal commented 5 years ago

Hi @huseyin39,

Currently, staruml-ruby doesn't support default value of variables. I have been planning to add this feature since a few months ago. The idea is simple. The default value is taken from defaultValue on attribute properties of StarUML. It also considers data type of variables.

I just add this into Roadmap. Thank you for your feedback. I hope I can implement this next month. But, you can also make a contribution by creating a pull request :)

huseyin39 commented 5 years ago

Hi @meisyal , If i have the opportunity, I will do it!

meisyal commented 5 years ago

This feature has been included in release 0.1.9.