Class: ClamChowder::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/clam_chowder/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pathObject (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_nameObject (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

Returns:

  • (Boolean)


11
12
13
# File 'lib/clam_chowder/response.rb', line 11

def infected?
  @status == 'FOUND'
end