Class: Nsync::Producer::Change

Inherits:
Consumer::Change show all
Defined in:
lib/nsync/producer.rb

Instance Attribute Summary

Attributes inherited from Consumer::Change

#diff, #id

Instance Method Summary collapse

Methods inherited from Consumer::Change

#a_data, #data, #json_data, #type

Instance Method Details

#b_data(parse_json = true) ⇒ Object



64
65
66
67
68
69
70
71
# File 'lib/nsync/producer.rb', line 64

def b_data(parse_json=true)
  if type == :deleted
    super
  else
    val = File.read(File.join(Nsync.config.repo_path, diff.b_path))
    parse_json ? json_data(val) : val
  end
end