项目作者: meisyal

项目描述 :
StarUML的Ruby扩展。
高级语言: JavaScript
项目地址: git://github.com/meisyal/staruml-ruby.git
创建时间: 2016-01-14T07:24:54Z
项目社区:https://github.com/meisyal/staruml-ruby

开源协议:MIT License

下载


staruml-ruby

staruml-ruby is a Ruby extension for StarUML. This extension helps
you to generate Ruby code from a UML class diagram. For example, you have a
class called Book.

Book class

staruml-ruby will generate code below:

  1. class Book
  2. def initialize(name, price, qty)
  3. @name = name
  4. @price = price
  5. @qty = qty
  6. end
  7. private
  8. attr_accessor :name, :price, :qty
  9. def to_s
  10. "Your string representation of the object will be written here."
  11. end
  12. end

Current Status

This extension currently supports generating Ruby code from a UML class diagram.
Reverse engineering from Ruby code to a UML class diagram is not supported at
the moment.

Please, refer to [Supported UML concepts][umlconcept] page for futher details.

Installation

The simplest way to install staruml-ruby is from StarUML extension repository.
This installation method is explained as follows:

  1. Click Tools -> Extension Manager… on the menu bar of StarUML.
    The Extension Manager window will appear as a pop-up window.
  2. Select Registry button.
  3. Type ruby on search box. Ruby extension will appear.
  4. Press Install button of Ruby extension.

Note that internet connection is needed to perfom the installation.

StarUML extension repository stores extensions that officially registered.
Because of it, I highly recommend to use this installation method.
Registered extensions are available on this page.

See Installation for other installation methods.

Usage

Prepare your model that contains a UML class diagram and then:

  1. Click Tools -> Ruby -> Generate Code… on the menu bar of
    StarUML. A pop-up window will appear.
  2. Choose a model that will be generated its code. And then, press OK
    button.
  3. Select a location where the generated code will be stored.
  4. Press Open button.

Configuration

You can configure the extension before generating the code. The configuration
handles how the generated code looks like. Indentation of code and code comment,
for example. This is supported by this extension to generate Ruby code, as
you prefer.

Check Configuration to configure the extension.

Documentation

Documentation is available at staruml-ruby GitHub Wiki. Documentation
contains a lot more detail on examples, features, and roadmap.

Contributing

Contributions are welcome. Before submitting an issue or a pull request, please
take a moment to look over the [contributing guidelines][contributing] first.

License

This extension is released under the terms of MIT License. See the
LICENSE file for more details.

Copyright © 2016-2019 Andrias Meisyal.

[umlconcept]:
https://github.com/meisyal/staruml-ruby/wiki/Supported-UML-Concepts

[contributing]:
https://github.com/meisyal/staruml-ruby/blob/master/CONTRIBUTING.md