module Temple::Mixins::ThreadOptions
Public Instance Methods
thread_options()
click to toggle source
# File lib/temple/mixins/options.rb, line 59 def thread_options Thread.current[thread_options_key] end
with_options(options) { || ... }
click to toggle source
# File lib/temple/mixins/options.rb, line 51 def with_options(options) old_options = thread_options Thread.current[thread_options_key] = ImmutableMap.new(options, thread_options) yield ensure Thread.current[thread_options_key] = old_options end
Protected Instance Methods
thread_options_key()
click to toggle source
# File lib/temple/mixins/options.rb, line 65 def thread_options_key @thread_options_key ||= "#{self.name}-thread-options".to_sym end