Module: Temple::Mixins::Options

Included in:
ERB::Parser, Engine, Filter, Generator
Defined in:
lib/temple/mixins/options.rb

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) options (readonly)

Returns the value of attribute options



21
22
23
# File 'lib/temple/mixins/options.rb', line 21

def options
  @options
end

Class Method Details

+ (Object) included(base)



17
18
19
# File 'lib/temple/mixins/options.rb', line 17

def self.included(base)
  base.class_eval { extend DefaultOptions }
end

Instance Method Details

- (Options) initialize(options = {})

Returns a new instance of Options

Returns:

  • (Options)

    a new instance of Options



23
24
25
# File 'lib/temple/mixins/options.rb', line 23

def initialize(options = {})
  @options = ImmutableHash.new(options, self.class.default_options)
end