Class: Merge

Inherits:
Object
  • Object
show all
Defined in:
lib/xmimerge/merge.rb

Instance Method Summary collapse

Constructor Details

#initializeMerge

Returns a new instance of Merge.



4
5
6
7
8
9
10
# File 'lib/xmimerge/merge.rb', line 4

def initialize	
	@app = 	App.instance
	@from = @app.from
	@to = @app.to		
	@log = App.logger
	@commands = @app.commands_file
end

Instance Method Details

#checkObject



12
13
14
15
16
# File 'lib/xmimerge/merge.rb', line 12

def check
	#@log.debug "Check"
	@only_check = true
	verify
end

#check_change_propertie(method, from, to, name) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/xmimerge/merge.rb', line 24

def check_change_propertie(method, from, to, name)

	changes = Util.check_change_by_method(method, from, to)

	if !changes.nil?
		command = "\t* #{name} #{from.full_name} {'#{changes[0]}' --> '#{changes[1]}'}"
		@commands.add_command_to_buffer(command)
		unless @only_check 
			if @commands.has_command?(command)
				@log.info "[OK] #{command}"
			else
				#@log.info "[NOT] #{command}"
			end
		end
	end			
end

#mergeObject



18
19
20
21
22
# File 'lib/xmimerge/merge.rb', line 18

def merge
	#@log.debug "Merge"
	@only_check = false
	verify
end