module Temple::Mixins::Options

@api public

Attributes

options[R]

Public Class Methods

included(base) click to toggle source
# File lib/temple/mixins/options.rb, line 69
def self.included(base)
  base.class_eval do
    extend DefaultOptions
    extend ThreadOptions
  end
end
new(opts = {}) click to toggle source
# File lib/temple/mixins/options.rb, line 78
def initialize(opts = {})
  self.class.default_options.validate_hash!(opts)
  self.class.default_options.validate_hash!(self.class.thread_options) if self.class.thread_options
  @options = ImmutableHash.new({}.update(self.class.default_options).update(self.class.thread_options || {}).update(opts))
end