Class: ClamChowder::Response
- Inherits:
-
Object
- Object
- ClamChowder::Response
- Defined in:
- lib/clam_chowder/response.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#virus_name ⇒ Object
readonly
Returns the value of attribute virus_name.
Instance Method Summary collapse
- #infected? ⇒ Boolean
-
#initialize(status, file_path, virus_name = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status, file_path, virus_name = nil) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/clam_chowder/response.rb', line 5 def initialize(status, file_path, virus_name = nil) @status = status @file_path = file_path @virus_name = virus_name end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
3 4 5 |
# File 'lib/clam_chowder/response.rb', line 3 def file_path @file_path end |
#virus_name ⇒ Object (readonly)
Returns the value of attribute virus_name.
3 4 5 |
# File 'lib/clam_chowder/response.rb', line 3 def virus_name @virus_name end |
Instance Method Details
#infected? ⇒ Boolean
11 12 13 |
# File 'lib/clam_chowder/response.rb', line 11 def infected? @status == 'FOUND' end |