Class: Reactor::Plans::UpdateGroup

Inherits:
CommonGroup show all
Defined in:
lib/reactor/plans/update_group.rb

Constant Summary

Constants inherited from CommonGroup

CommonGroup::ALLOWED_PARAMS

Instance Method Summary collapse

Methods inherited from CommonGroup

#set

Methods included from Prepared

#error, #separate_arguments

Constructor Details

#initialize(*args) ⇒ UpdateGroup

Returns a new instance of UpdateGroup.



8
9
10
11
12
13
# File 'lib/reactor/plans/update_group.rb', line 8

def initialize(*args)
  super()

  (name, _), options = separate_arguments(*args)
  @name = name || options[:name]
end

Instance Method Details

#migrate!Object



22
23
24
25
# File 'lib/reactor/plans/update_group.rb', line 22

def migrate!
  group = Reactor::Cm::Group.get(@name)
  migrate_params!(group)
end

#prepapre!Object



15
16
17
18
19
20
# File 'lib/reactor/plans/update_group.rb', line 15

def prepapre!
  error('name is nil') if @name.nil?
  error("group #{@name} not found") unless Reactor::Cm::Group.exists?(@name)

  prepare_params!(nil)
end