Module: FoxTail::Concerns::HasOptions

Extended by:
ActiveSupport::Concern
Included in:
BaseComponent
Defined in:
app/components/fox_tail/concerns/has_options.rb

Constant Summary collapse

RESERVED_OPTIONS =
[FoxTail::Theme::BASE_KEY.to_s].freeze

Instance Method Summary collapse

Instance Method Details

#extract_options!(options = {}) ⇒ Object



12
13
14
15
16
# File 'app/components/fox_tail/concerns/has_options.rb', line 12

def extract_options!(options = {})
  options.extract!(*registered_options.keys).each do |k, v|
    self.options[k.to_sym] = v
  end
end

#optionsObject



8
9
10
# File 'app/components/fox_tail/concerns/has_options.rb', line 8

def options
  @options ||= self.class.default_options
end