class RGen::ECore::ECoreToRuby::FeatureWrapper
Public Class Methods
new(efeature, classifiers)
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 97 def initialize(efeature, classifiers) @efeature = efeature @classifiers = classifiers end
Public Instance Methods
impl_type()
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 114 def impl_type etype = @efeature.eType if etype.is_a?(RGen::ECore::EClass) || etype.is_a?(RGen::ECore::EEnum) @classifiers[etype] else ic = etype.instanceClass if ic ic else raise "unknown type: #{etype.name}" end end end
many?()
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 105 def many? @efeature.many end
opposite()
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 111 def opposite @efeature.eOpposite end
reference?()
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 108 def reference? @efeature.is_a?(RGen::ECore::EReference) end
value(prop)
click to toggle source
# File lib/rgen/ecore/ecore_to_ruby.rb, line 101 def value(prop) return false if prop == :containment && @efeature.is_a?(RGen::ECore::EAttribute) @efeature.send(prop) end