-
Notifications
You must be signed in to change notification settings - Fork 2
Class association and navigability
Kevin Boice edited this page Mar 22, 2014
·
4 revisions
- Select an association
- Specify navigability by choosing 'Navigable - True' and 'Owner - Classifier'
- Only associations with 'Navigable' set to True and 'Owner' set to 'Classifier' will generate Ruby - Draws an arrow
- To specify the visibility (scope) of a property (variable) select the property from the model explorer
- Select the desired visibility (public/private/protected)
Class1.rb
require_relative '../autogen/Class3.rb'
require_relative '../autogen/Class2.rb'
class Class1
public
def initialize
@class2 = Class2.new
@class3 = Class3.new
end
protected
attr_accessor :class3
private
attr_accessor :class2
end
Class2.rb
require_relative '../autogen/Class3.rb'
class Class2
public
def initialize
@class3 = Class3.new
end
protected
private
attr_accessor :class3
end
Class3.rb
class Class3
public
def initialize
end
protected
private
end