Initialize the list of allowed writer methods

 @return [undefined]

 @api private
549334
def finalize_allowed_writer_methods
      @allowed_writer_methods  = public_instance_methods.map { |method| method.to_s }.grep(WRITER_METHOD_REGEXP).to_set
      @allowed_writer_methods -= INVALID_WRITER_METHODS
      @allowed_writer_methods.freeze
    end
97070
def stringify(allowed_keys: nil, allowed_vals: nil)
      keys = allowed_keys || self.class.allowed[:keys]

      map do |v|
        v = v.to_s unless keys.include?(v.class)
        !v.respond_to?(:stringify) ? v : v.stringify({
          :allowed_keys => allowed_keys,
          :allowed_vals => allowed_vals
        })
      end
    end
53354
def init
      return if @has_been_init

      @socket = init_socket(@socket)
      @socket.connect # costly and blocking !

      internalWrapper = (Struct.new :url, :socket do
        def write(*args)
          self.socket.write(*args)
        end
      end).new @url.to_s, @socket

      # this, also, is costly and blocking
      @driver = WebSocket::Driver.client internalWrapper
      @driver.on :open do
        @connected = true
        unless @callbacks[:open].nil?
          @callbacks[:open].call
        end
      end

      @driver.on :error do |event|
        @connected = false
        unless @callbacks[:error].nil?
          @callbacks[:error].call
        end
      end

      @driver.on :message do |event|
        data = JSON.parse event.data
        unless @callbacks[:message].nil?
          @callbacks[:message].call data
        end
      end
      @driver.start
      @has_been_init = true
    end
153647
def method_missing method, *args, &block
      method, *args = special_handler(method, *args, &block) \
        if self.private_methods.include?(:special_handler)
      [method, args].flatten
    end
1020889
def attr_writer(*methods)
      methods.each do |method|
        define_method("#{method}=") do |value|
          instance_variable_set(:"@#{method}", value)
        end
      end
    end
26450
def method_missing(method_name, *_args)
      if attrs.key?(method_name.to_s)
        attrs[method_name.to_s]
      else
        super(method_name)
      end
    end
1346402
def bound_rewritable_methods(self, methods):
        
        for key, value in methods.items():
            if key in self.REWRITABLE_METHODS:
                setattr(self, key, types.MethodType(value, self))
1226109
def method_missing(method)
      method = method.to_s
      raise NoMethodError, "No such method: #{method}" unless @args.keys.include? method
      @args[method]
    end
628973
def get_all_methods
      methods = []
      each_type do | type |
        type.each_method do |meth|
          methods << meth
        end
      end
      methods
    end
279602
def create_headline_methods
      api_resources.each do |k,v|
        define_singleton_method(k) do |opt=nil|
          get_results(v[:url], get_api_method(opt))
        end
      end
    end
1152854
def apply_to_methods
      # If method/methods option is set and all are String or Symbol, apply to those only, instead of
      # iterating through all methods
      methods = [@options[:method] || @options[:methods]]
      methods.compact!
      methods.flatten!

      if !methods.empty? && methods.all?{ |method| method.is_a?(String) || method.is_a?(Symbol) }
        methods.each do |method|
          apply_to_method(method.to_s)
        end

        return
      end

      context.public_instance_methods.each do |method|
        apply_to_method(method.to_s)
      end

      context.protected_instance_methods.each do |method|
        apply_to_method(method.to_s)
      end

      if @options[:private_methods]
        context.private_instance_methods.each do |method|
          apply_to_method(method.to_s)
        end
      end
    end
702966
def init_contents
      self[:Contents] = self[:Contents][:referenced_object][:indirect_without_dictionary] if self[:Contents].is_a?(Hash) && self[:Contents][:referenced_object] && self[:Contents][:referenced_object].is_a?(Hash) && self[:Contents][:referenced_object][:indirect_without_dictionary]
      self[:Contents] = [self[:Contents]] unless self[:Contents].is_a?(Array)
      self[:Contents].delete(is_reference_only: true, referenced_object: { indirect_reference_id: 0, raw_stream_content: '' })
      # un-nest any referenced arrays
      self[:Contents].map! { |s| actual_value(s).is_a?(Array) ? actual_value(s) : s }
      self[:Contents].flatten!
      self[:Contents].compact!
      # wrap content streams
      insert_content 'q', 0
      insert_content 'Q'

      # Prep content
      @contents = ''
      insert_content @contents
      @contents
    end
183373
def writeable_attributes(*attrs)
      @writeable_attributes ||= []
      if attrs.any?
        @writeable_attributes.map!(&:to_sym).concat(attrs).uniq! if attrs.any?
        setup_attributes(@writeable_attributes, false)
      end
      @writeable_attributes
    end
155986
def method_missing(method_sym, *args, &block) # rubocop:disable Style/MethodMissingSuper
      return nil.__send__(method_sym, *args, &block) if nil.respond_to?(method_sym)

      self
    end
456525
def method_missing(name, *arguments)
      value = arguments[0]
      name = name.to_s
      if name[-1, 1] == '='
        key = name[/(.+)\s?=/, 1]
        @data[key.to_sym] = value unless instance_variables.include? "@#{key}".to_sym
      else
        @data[name.to_sym]
      end
    end
190798
def init_lists(hash)
      self.methods = nil
      self.names = List.new
      self.types = List.new
      raise "No type Type in #{hash}" unless hash[:type]
      private_add_instance_variable(:type , hash[:type]) #first
      hash.each do |name , type|
        private_add_instance_variable(name , type) unless name == :type
      end
    end
195254
def init
      raise Erlang::ImproperListError if improper?
      return Erlang::Nil if tail.empty?
      out = tail = Erlang::Cons.allocate
      list = self
      until list.tail.empty?
        new_node = Erlang::Cons.allocate
        new_node.instance_variable_set(:@head, list.head)
        new_node.instance_variable_set(:@improper, false)
        tail.instance_variable_set(:@tail, new_node)
        tail.instance_variable_set(:@improper, false)
        tail.immutable!
        tail = new_node
        list = list.tail
      end
      if not tail.immutable?
        tail.instance_variable_set(:@tail, Erlang::Nil)
        tail.immutable!
      end
      return out.tail
    end