class Ro::Git::Patch

Public Class Methods

new(*args) click to toggle source
# File lib/ro/git.rb, line 158
def initialize(*args)
  options = Map.options_for!(args)

  self.class.fattrs.each do |key|
    send(key, options.get(key)) if options.has?(key)
  end

  unless args.empty?
    self.data = args.join
  end
end

Public Instance Methods

save(path) click to toggle source
# File lib/ro/git.rb, line 170
def save(path)
  return false unless data
  path = path.to_s
  FileUtils.mkdir_p(File.dirname(path))
  IO.binwrite(path, data)
end