Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Takeshi K on August 11, 2005, 07:03:39 pm
-
Hello all,
Now I make code tempalte for Ruby. But it's first BETA
version.
Please tell me if you find any bugs, mistakes and suggestions.
http://www.sparxsystems.jp/bin/ruby_code_template.xml
Finally, I'll upload it to EA User Group website.
Now I'm making templates for Perl and C. I'll post them
after making BETA version.
How to use::
1. add language 'Ruby' from Configuration->Language
DataTypes
(Press 'Add Product' button and add dummy type -
EA doesn't recognize if there is no type definition.)
2. import the XML file
3. make Classes and set language type to 'Ruby'.
Sample Source Code::
class TheClass < ParentClass
attr_accessor :att1
attr_reader :att2
attr_writer :att3
def initialize(att1, att2, att3)
@att1 = att1; @att2 = att2; @att3 = att3
@att4 = "hoge"
end
def ==(other)
other.att1 = @att1 && other.att2 = @att2 && other.att3 = @att3
end
#comment of op1
def op1(param1)
end
def op2()
end
private :op2
end
--
t-kouno
-
I'm currently devloping in C and Ruby, neither of which are supported by EA.
Your templates sound interesting but I don't seem to be able to access them, can they be made on this site if possible?
thanks,
Jim.
-
Hello Jim,
As you said, now it's impossible to download it. After then,
I made it to MDG Technology file to support Ruby file
extension (.rb) but I haven't upload the new file.
Currently I have no plan to upload it to public area,
but I'm sure you will receive good news from Sparx
development team in the future.
--
t-kouno