Class: Clamrb::Result
- Inherits:
-
Object
- Object
- Clamrb::Result
- Defined in:
- lib/clamrb/result.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(status, identifier = nil) ⇒ Result
constructor
A new instance of Result.
- #safe? ⇒ Boolean
- #virus? ⇒ Boolean
Constructor Details
#initialize(status, identifier = nil) ⇒ Result
Returns a new instance of Result.
5 6 7 |
# File 'lib/clamrb/result.rb', line 5 def initialize(status, identifier = nil) @status, @identifier = status, identifier end |
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/clamrb/result.rb', line 3 def identifier @identifier end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/clamrb/result.rb', line 3 def status @status end |
Instance Method Details
#error? ⇒ Boolean
17 18 19 |
# File 'lib/clamrb/result.rb', line 17 def error? status == :unknown end |
#safe? ⇒ Boolean
9 10 11 |
# File 'lib/clamrb/result.rb', line 9 def safe? status != :infected end |
#virus? ⇒ Boolean
13 14 15 |
# File 'lib/clamrb/result.rb', line 13 def virus? status == :infected end |