class SslLabs::EndpointData::Details::Sim::Client

Constants

ATTRS

Public Class Methods

from_hash(hash) click to toggle source
# File lib/ssl_labs/endpoint_data/details/sim/client.rb, line 22
def self.from_hash(hash)
  client = self.new
  hash.each do |k, v|
    case sym = Util.underscore(k).to_sym
    when *ATTRS
      client.send("#{sym}=", v)
    else
      raise ArgumentError, "Unknown key #{k.inspect} (#{sym.inspect})"
    end
  end
  client
end