Module: RGen::MetamodelBuilder::MMBase::FixingCollidingFeatureAddOn
- Included in:
- RGen::MetamodelBuilder::MMBase
- Defined in:
- lib/codemodels/rgen_ext.rb
Instance Method Summary collapse
- #contains_many_uni(role, target_class = nil, raw_props = {}, &block) ⇒ Object
- #contains_one_uni(role, target_class = nil, raw_props = {}, &block) ⇒ Object
- #has_attr(role, target_class = nil, raw_props = {}, &block) ⇒ Object
- #has_many_attr(role, target_class = nil, raw_props = {}, &block) ⇒ Object
Instance Method Details
#contains_many_uni(role, target_class = nil, raw_props = {}, &block) ⇒ Object
115 116 117 118 119 |
# File 'lib/codemodels/rgen_ext.rb', line 115 def contains_many_uni(role, target_class=nil, raw_props={}, &block) raise "Role already used #{role}" if self.ecore.eAllAttributes.find {|a| a.name==role.to_s} raise "Role already used #{role}" if self.ecore.eAllReferences.find {|r| r.name==role.to_s} super(role,target_class,raw_props,block) end |
#contains_one_uni(role, target_class = nil, raw_props = {}, &block) ⇒ Object
120 121 122 123 124 |
# File 'lib/codemodels/rgen_ext.rb', line 120 def contains_one_uni(role, target_class=nil, raw_props={}, &block) raise "Role already used #{role}" if self.ecore.eAllAttributes.find {|a| a.name==role.to_s} raise "Role already used #{role}" if self.ecore.eAllReferences.find {|r| r.name==role.to_s} super(role,target_class,raw_props,block) end |
#has_attr(role, target_class = nil, raw_props = {}, &block) ⇒ Object
105 106 107 108 109 |
# File 'lib/codemodels/rgen_ext.rb', line 105 def has_attr(role, target_class=nil, raw_props={}, &block) raise "Role already used #{role}" if self.ecore.eAllAttributes.find {|a| a.name==role.to_s} raise "Role already used #{role}" if self.ecore.eAllReferences.find {|r| r.name==role.to_s} super(role,target_class,raw_props,block) end |
#has_many_attr(role, target_class = nil, raw_props = {}, &block) ⇒ Object
110 111 112 113 114 |
# File 'lib/codemodels/rgen_ext.rb', line 110 def has_many_attr(role, target_class=nil, raw_props={}, &block) raise "Role already used #{role}" if self.ecore.eAllAttributes.find {|a| a.name==role.to_s} raise "Role already used #{role}" if self.ecore.eAllReferences.find {|r| r.name==role.to_s} super(role,target_class,raw_props,block) end |