Class: RgGen::Core::Builder::GeneralFeatureEntry
Instance Attribute Summary
#name, #registry
Instance Method Summary
collapse
#attach_context
#build_factory, #initialize, #match_entry_type?, #modify
Instance Method Details
#define_factory(&body) ⇒ Object
Also known as:
factory
16
17
18
|
# File 'lib/rggen/core/builder/general_feature_entry.rb', line 16
def define_factory(&body)
@factory.class_exec(&body)
end
|
#define_feature(&body) ⇒ Object
Also known as:
feature
22
23
24
|
# File 'lib/rggen/core/builder/general_feature_entry.rb', line 22
def define_feature(&body)
@feature.class_exec(&body)
end
|
#setup(base_feature, base_factory, context, &body) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/rggen/core/builder/general_feature_entry.rb', line 9
def setup(base_feature, base_factory, context, &body)
@feature = Class.new(base_feature)
@factory = Class.new(base_factory)
attach_shared_context(context, @feature, @factory, self)
eval_body(&body)
end
|