Class: AutoC::Module::StreamFile
- Inherits:
-
File
- Object
- File
- AutoC::Module::StreamFile
- Defined in:
- lib/autoc/module.rb
Instance Method Summary collapse
- #<<(data) ⇒ Object
- #digest ⇒ Object
-
#initialize(*args, **kws) ⇒ StreamFile
constructor
A new instance of StreamFile.
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 |
#digest ⇒ Object
159 |
# File 'lib/autoc/module.rb', line 159 def digest = @digest.hexdigest |