def class_from_string(field)
      str = field.to_s.split('_').map(&:capitalize!).join
      str = 'Vulnerability' if str == 'Vulnerabilities'
      str.chop! if str.end_with?('s')
      Object.const_get('Nexpose').const_get(str)
    end
def class_from_string(field)
      str = field.to_s.split('_').map(&:capitalize!).join
      str = 'Vulnerability' if str == 'Vulnerabilities'
      str.chop! if str.end_with?('s')
      Object.const_get('Nexpose').const_get(str)
    end
Get the class referred to by a field name.

 For example, this method will translate a field name like "malware_kits"
 into to corresponding MalwareKit class.

 @param [String] field Snake-case name of a field.
 @return [Class] Class associated with the provided field.