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.



4
5
6
7
8
9
# File 'lib/reactor/plans/update_group.rb', line 4

def initialize(*args)
  super()

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

Instance Method Details

#migrate!Object



18
19
20
21
# File 'lib/reactor/plans/update_group.rb', line 18

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

#prepapre!Object



11
12
13
14
15
16
# File 'lib/reactor/plans/update_group.rb', line 11

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

  prepare_params!(nil)
end