Class: Nuri::Master::VMProcedureModifier

Inherits:
Object
  • Object
show all
Defined in:
lib/nuri/master.rb

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ VMProcedureModifier

Returns a new instance of VMProcedureModifier.



594
595
596
# File 'lib/nuri/master.rb', line 594

def initialize(root)
	@root = root
end

Instance Method Details

#visit(name, value, parent) ⇒ Object



598
599
600
601
602
603
604
605
606
607
# File 'lib/nuri/master.rb', line 598

def visit(name, value, parent)
	return false if name[0,1] == '_'
	if value.is_a?(Hash) and value['_context'] == 'procedure'
		_, agent, _ = parent.ref.split('.', 3)
		if not @root[agent]['_classes'].index(VMSchema).nil?
			value['_condition']["$.#{agent}.created"] = Sfp::Helper::Constraint.equals(true)
		end
	end
	true
end