Class: AutoC::Module::StreamFile

Inherits:
File
  • Object
show all
Defined in:
lib/autoc/module.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kws) ⇒ StreamFile

Returns a new instance of StreamFile.



161
162
163
164
# File 'lib/autoc/module.rb', line 161

def initialize(*args, **kws)
  super(*args, **kws)
  @digest = Digest::MD5.new
end

Instance Method Details

#<<(data) ⇒ Object



166
167
168
169
170
# File 'lib/autoc/module.rb', line 166

def <<(data)
  super(data)
  @digest.update(data)
  self
end

#digestObject



159
# File 'lib/autoc/module.rb', line 159

def digest = @digest.hexdigest