module BluePrint::Helper
Public Instance Methods
within_context_of(name_or_context, fallback = nil) { |env| ... }
click to toggle source
# File lib/blue_print/helper.rb, line 4 def within_context_of(name_or_context, fallback = nil, &block) context = BluePrint::Context.resolve(name_or_context) if context.active? block_given? && yield(BluePrint.env) else fallback.respond_to?(:call) && fallback.call(BluePrint.env) end end
without_context_of(name_or_context, fallback = nil, &block)
click to toggle source
# File lib/blue_print/helper.rb, line 14 def without_context_of(name_or_context, fallback = nil, &block) within_context_of(name_or_context, block, &fallback) end