Sha256: 22baa39c477c59c7573a634fd9a09ea490e360d9d346371efb922103dc1d839d
Contents?: true
Size: 503 Bytes
Versions: 1
Compression:
Stored size: 503 Bytes
Contents
module Gitrb # This class stores the raw string data of a blob class Blob < GitObject attr_accessor :data, :mode # Initialize a Blob def initialize(options = {}) super(options) @data = options[:data] @mode = options[:mode] || 0100644 end def type :blob end def dump @data end # Save the data to the git object repository def save raise 'Blob is empty' if !data repository.put(self) id end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitrb-0.1.8 | lib/gitrb/blob.rb |