Class: TeamCymru::MalwareResult
- Inherits:
-
Struct
- Object
- Struct
- TeamCymru::MalwareResult
- Defined in:
- lib/teamcymru/malware.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#percent_detect ⇒ Object
Returns the value of attribute percent_detect.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(hash, timestamp, percent_detect) ⇒ MalwareResult
constructor
A new instance of MalwareResult.
Constructor Details
#initialize(hash, timestamp, percent_detect) ⇒ MalwareResult
Returns a new instance of MalwareResult.
6 7 8 9 10 |
# File 'lib/teamcymru/malware.rb', line 6 def initialize(hash, , percent_detect) self.hash = hash self. = Time.at(.to_i) self.percent_detect = (percent_detect == "NO_DATA") ? 0 : percent_detect.to_i end |
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash
5 6 7 |
# File 'lib/teamcymru/malware.rb', line 5 def hash @hash end |
#percent_detect ⇒ Object
Returns the value of attribute percent_detect
5 6 7 |
# File 'lib/teamcymru/malware.rb', line 5 def percent_detect @percent_detect end |
#timestamp ⇒ Object
Returns the value of attribute timestamp
5 6 7 |
# File 'lib/teamcymru/malware.rb', line 5 def end |