<commit_before>require 'ostruct'
require 'kelbim/dsl/checker'
require 'kelbim/dsl/listener'

module Kelbim
  class DSL
    class EC2
      class LoadBalancer
        class Listeners
          include Checker

          def initialize(load_balancer, &block)
            @error_identifier = "LoadBalancer `#{load_balancer}`"
            @result = {}
            instance_eval(&block)
          end

          def result
            required(:listener, @result)

            @result.map do |protocol_ports, listener|
              protocol, port, instance_protocol, instance_port = protocol_ports.first.flatten

              OpenStruct.new({
                :protocol          => protocol,
                :port              => port,
                :instance_protocol => instance_protocol,
                :instance_port     => instance_port,
                :ssl_certificate   => listener.ssl_certificate,
                :policies          => listener.policies,<commit_msg>fix listeners dsl<commit_after>require 'ostruct'
require 'kelbim/dsl/checker'
require 'kelbim/dsl/listener'

module Kelbim
  class DSL
    class EC2
      class LoadBalancer
        class Listeners
          include Checker

          def initialize(load_balancer, &block)
            @error_identifier = "LoadBalancer `#{load_balancer}`"
            @result = {}
            instance_eval(&block)
          end

          def result
            required(:listener, @result)

            @result.map do |protocol_ports, listener|
              protocol, port, instance_protocol, instance_port = protocol_ports.first.flatten

              OpenStruct.new({
                :protocol           => protocol,
                :port               => port,
                :instance_protocol  => instance_protocol,
                :instance_port      => instance_port,
                :server_certificate => listener.server_certificate,
                :policies           => listener.policies,
{'fraction_non_alphanumeric': 0.07955124936257012, 'fraction_numerical': 0.0010198878123406426, 'mean_word_length': 1.7174515235457064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2104791', 'n_tokens_mistral': 508, 'n_tokens_neox': 493, 'n_words': 107}