Class: RGen::MetamodelBuilder::BuilderExtensions::FeatureBlockEvaluator
- Inherits:
-
Object
- Object
- RGen::MetamodelBuilder::BuilderExtensions::FeatureBlockEvaluator
- Defined in:
- lib/rgen/metamodel_builder/builder_extensions.rb
Class Method Summary collapse
Instance Method Summary collapse
- #annotation(hash) ⇒ Object
-
#initialize(props1, props2) ⇒ FeatureBlockEvaluator
constructor
A new instance of FeatureBlockEvaluator.
- #opposite_annotation(hash) ⇒ Object
Constructor Details
#initialize(props1, props2) ⇒ FeatureBlockEvaluator
Returns a new instance of FeatureBlockEvaluator.
27 28 29 |
# File 'lib/rgen/metamodel_builder/builder_extensions.rb', line 27 def initialize(props1, props2) @props1, @props2 = props1, props2 end |
Class Method Details
.eval(block, props1, props2 = nil) ⇒ Object
22 23 24 25 26 |
# File 'lib/rgen/metamodel_builder/builder_extensions.rb', line 22 def self.eval(block, props1, props2=nil) return unless block e = self.new(props1, props2) e.instance_eval(&block) end |
Instance Method Details
#annotation(hash) ⇒ Object
30 31 32 |
# File 'lib/rgen/metamodel_builder/builder_extensions.rb', line 30 def annotation(hash) @props1.annotations << Intermediate::Annotation.new(hash) end |
#opposite_annotation(hash) ⇒ Object
33 34 35 36 |
# File 'lib/rgen/metamodel_builder/builder_extensions.rb', line 33 def opposite_annotation(hash) raise "No opposite available" unless @props2 @props2.annotations << Intermediate::Annotation.new(hash) end |