Module: RgGen::Core::Base::SharedContext
- Included in:
- Feature, FeatureFactory, RgGen::Core::Builder::GeneralFeatureEntry, RgGen::Core::Builder::ListFeatureEntry
- Defined in:
- lib/rggen/core/base/shared_context.rb
Instance Method Summary collapse
Instance Method Details
#attach_context(context) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rggen/core/base/shared_context.rb', line 7 def attach_context(context) if is_a?(Module) define_method(:shared_context) { context } else instance_variable_set(:@shared_context, context) singleton_exec { attr_reader :shared_context } end end |