Module: Phenomenal::ContextCreation
- Included in:
- Context
- Defined in:
- lib/phenomenal/context/context_creation.rb
Instance Method Summary collapse
Instance Method Details
#create(nested, closest_feature, context, *contexts, &block) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/phenomenal/context/context_creation.rb', line 2 def create(nested,closest_feature,context,*contexts,&block) manager = Phenomenal::Manager.instance contexts.insert(0,context) if contexts.length==1 context = find_or_create_simple_context(manager,context) else #Combined contexts context = find_or_create_combined_context(manager,contexts,nested,closest_feature) end context.add_adaptations(&block) context end |