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.
259 260 261 262 263 |
# File 'lib/dorothy2/DEM.rb', line 259 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.
254 255 256 |
# File 'lib/dorothy2/DEM.rb', line 254 def cont @cont end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
256 257 258 |
# File 'lib/dorothy2/DEM.rb', line 256 def date @date end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
255 256 257 |
# File 'lib/dorothy2/DEM.rb', line 255 def path @path end |
#sha2 ⇒ Object
Returns the value of attribute sha2.
253 254 255 |
# File 'lib/dorothy2/DEM.rb', line 253 def sha2 @sha2 end |
#size ⇒ Object
Returns the value of attribute size.
257 258 259 |
# File 'lib/dorothy2/DEM.rb', line 257 def size @size end |
Class Method Details
.sha2(content) ⇒ Object
265 266 267 268 |
# File 'lib/dorothy2/DEM.rb', line 265 def self.sha2(content) @sha2 = Digest::SHA2.new @sha2 << content end |