Class: DoroParser::DoroFile
- Inherits:
-
Object
- Object
- DoroParser::DoroFile
- Defined in:
- lib/dorothy2/DEM.rb
Instance Attribute Summary collapse
-
#cont ⇒ Object
Returns the value of attribute cont.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#sha2 ⇒ Object
Returns the value of attribute sha2.
-
#size ⇒ Object
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ DoroFile
constructor
A new instance of DoroFile.
Constructor Details
#initialize(hash) ⇒ DoroFile
Returns a new instance of DoroFile.
330 331 332 333 334 |
# File 'lib/dorothy2/DEM.rb', line 330 def initialize(hash) repo = DoroSettings.env[:home] + "/downloads" @path = "#{repo}/#{hash}.exe" @date = Time.new.strftime("%m/%d/%y %H:%M:%S") end |
Instance Attribute Details
#cont ⇒ Object
Returns the value of attribute cont.
325 326 327 |
# File 'lib/dorothy2/DEM.rb', line 325 def cont @cont end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
327 328 329 |
# File 'lib/dorothy2/DEM.rb', line 327 def date @date end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
326 327 328 |
# File 'lib/dorothy2/DEM.rb', line 326 def path @path end |
#sha2 ⇒ Object
Returns the value of attribute sha2.
324 325 326 |
# File 'lib/dorothy2/DEM.rb', line 324 def sha2 @sha2 end |
#size ⇒ Object
Returns the value of attribute size.
328 329 330 |
# File 'lib/dorothy2/DEM.rb', line 328 def size @size end |
Class Method Details
.sha2(content) ⇒ Object
336 337 338 339 |
# File 'lib/dorothy2/DEM.rb', line 336 def self.sha2(content) @sha2 = Digest::SHA2.new @sha2 << content end |