Class: Decidim::Voca::Updater

Inherits:
Object
  • Object
show all
Defined in:
lib/decidim/voca/updater.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Updater

Returns a new instance of Updater.



15
16
17
18
19
# File 'lib/decidim/voca/updater.rb', line 15

def initialize(options)
  @options = options
  validate_options!
  update!
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/decidim/voca/updater.rb', line 14

def options
  @options
end

Class Method Details

.update!(options) ⇒ Object



7
8
9
10
11
# File 'lib/decidim/voca/updater.rb', line 7

def update!(options)
  ActiveSupport::Deprecation.warn('deprecated.')

  updater = self.new(options.deep_symbolize_keys)
end