class SslLabs::EndpointData::Details::Suites

Implements a list of ciphersuites. The list is directly accessible via list but otherwise Array instance methods called on Suites are delegated to the list automatically.

Constants

ATTRS

Public Class Methods

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

Public Instance Methods

method_missing(method, *args, &blk) click to toggle source
Calls superclass method
# File lib/ssl_labs/endpoint_data/details/suites.rb, line 26
def method_missing(method, *args, &blk)
  [].respond_to?(method) ? @list.send(method, *args, &blk) : super
end
respond_to?(method) click to toggle source
Calls superclass method
# File lib/ssl_labs/endpoint_data/details/suites.rb, line 30
def respond_to?(method)
  super || [].respond_to?(method)
end