Class: Twin::Conflict::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/twin/conflict.rb

Overview

One file the target owns more recently than the source, with content that actually differs. same_content is nil when it could not be determined (remote targets) — treated as a conflict, because guessing in the other direction would overwrite work.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



38
39
40
# File 'lib/twin/conflict.rb', line 38

def job
  @job
end

#relObject

Returns the value of attribute rel

Returns:

  • (Object)

    the current value of rel



38
39
40
# File 'lib/twin/conflict.rb', line 38

def rel
  @rel
end

#source_mtimeObject

Returns the value of attribute source_mtime

Returns:

  • (Object)

    the current value of source_mtime



38
39
40
# File 'lib/twin/conflict.rb', line 38

def source_mtime
  @source_mtime
end

#source_pathObject

Returns the value of attribute source_path

Returns:

  • (Object)

    the current value of source_path



38
39
40
# File 'lib/twin/conflict.rb', line 38

def source_path
  @source_path
end

#target_mtimeObject

Returns the value of attribute target_mtime

Returns:

  • (Object)

    the current value of target_mtime



38
39
40
# File 'lib/twin/conflict.rb', line 38

def target_mtime
  @target_mtime
end

#target_pathObject

Returns the value of attribute target_path

Returns:

  • (Object)

    the current value of target_path



38
39
40
# File 'lib/twin/conflict.rb', line 38

def target_path
  @target_path
end

Instance Method Details

#age_deltaObject



40
41
42
43
# File 'lib/twin/conflict.rb', line 40

def age_delta
  return nil unless source_mtime && target_mtime
  target_mtime - source_mtime
end