rubocop:disable MethodLength
336135
def parser
      ::OptionParser.new do |parser|
        parser.banner = 'Usage: teamocil [options] <layout>'
        parser.separator ''
        parser.separator 'Specific options:'

        # Global options
        parser.on('--list', 'List all available layouts in `~/.teamocil/`') do
          @parsed_options[:list] = true
        end

        # Single layout options
        parser.on('--here', 'Set up the first layout window in the current tmux window') do
          @parsed_options[:here] = true
        end

        parser.on('--layout [layout]', 'Use a specific layout file, instead of `~/.teamocil/<layout>.yml`') do |layout|
          @parsed_options[:layout] = layout
        end

        parser.on('--edit', 'Edit the YAML layout file instead of using it') do
          @parsed_options[:edit] = true
        end

        parser.on('--show', 'Show the content of the layout file instead of executing it') do
          @parsed_options[:show] = true
        end

        # Debug options
        parser.on('--debug', 'Show the commands Teamocil will execute instead of actually executing them') do
          @parsed_options[:debug] = true
        end

        parser.on('--version', '-v', 'Show Teamocil’s version number') do
          Teamocil.puts(VERSION)
          exit
        end
      end
    end
353468
def method_missing(name, *args, &block)
      if args.empty? && !block_given? && @arg_names.include?(name)
        @args[name]
      else
        super
      end
    end
1143209
def method_missing(name, *args, &block)
      if @type.has_attribute?(name.to_s)
        __attribute__(name, *args)
      else
        __tag__(name, *args, &block)
      end
    end
1069886
def method_missing(id, *args, &block)
      ids = id.to_s
      if instance_variable_defined?(:@attributes)
        return @attributes[id] if @attributes.has_key?(id)
        return @attributes[ids] if @attributes.has_key?(ids)
      end
      raise NoMethodError.new("#{ids} not found", name)
    end
677761
def method_missing(name, *args, &block)
      return meta[name.to_s] if meta.key?(name.to_s)
      super
    end
561832
def method_missing(key, *args, &block)
      if key.to_s =~ /\A(.+)=\z/
        self[$1] = args.first
        return args.first
      end
      if key.to_s =~ /\A(.+)\?\z/
        return !!self[$1]
      end
      return self[key]  if has_key?(key)
      nil
    end
364199
def [](input)
      key = __convert_key(input)
      return @__config.key_error.call(key) if not key?(key)

      super(key)
    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
836953
def method_array
      @parser = nil
      @caller_lines.each do |kaller|
        code   = Ripper.sexp(kaller.contents)
        code  ||= Ripper.sexp(kaller.contents.sub(/^\W*(if|unless)/, ''.freeze)) # if and unless "block" statements aren't valid one line ruby code
        code  ||= Ripper.sexp(kaller.contents.sub(/do \|.*\|$/, ''.freeze)) # remove trailing do |thing| to make valid code
        code  ||= Ripper.sexp(kaller.contents.sub(/(and|or)\W*$/, ''.freeze))# trailing and || or
        code  ||= Ripper.sexp(kaller.contents.sub(/:\W*$/, ''.freeze)) # multi line ternary statements
        code  ||= Ripper.sexp(kaller.contents.sub(/(^\W*)|({ \|?.*\|?)}/, ''.freeze)) # multi line blocks using {}

        puts "LetItGoFailed parse (#{kaller.file_name}:#{kaller.line_number}: \n  \033[0;31m"+ kaller.contents.strip + "\e[0m".freeze if ENV['LET_IT_GO_RECORD_FAILED_CODE'] && code.nil? && kaller.contents.match(/"|'/)

        parser = ::LetItGo::WTFParser.new(code, contents: kaller.contents)

        if parser.each_method.any? { |m| m.method_name == method_name }
          @line_number = kaller.line_number
          @file_name   = kaller.file_name

          @parser = parser
          parser.each_method.each(&:arg_types)
          break
        else
          next
        end
      end
      @parser || []
    end
1029460
def commands
      validate_arguments!

      ruby_cmd = Heroku::Command.commands.inject({}) {|h, (cmd, command)| h[cmd] = command_to_hash('ruby', cmd, command) ; h}
      commands = Heroku::JSPlugin.commands_info['commands']
      node_cmd = command_list_to_hash(commands.select {|command| command['plugin'] != ''}, 'node')
      go_cmd   = command_list_to_hash(commands.select {|command| command['plugin'] == ''}, 'go')

      all_cmd = {}
      all_cmd.merge!(ruby_cmd)
      all_cmd.merge!(node_cmd)
      all_cmd.merge!(go_cmd)

      sorted_cmd = all_cmd.sort { |a,b| a[0] <=> b[0] }.map{|cmd| cmd[1]}

      attrs  = [:command, :type, :plugin]
      header = attrs.map{|attr| attr.to_s.capitalize}

      count_attrs  = [:type, :count]
      count_header = count_attrs.map{|attr| attr.to_s.capitalize}

      counts = all_cmd.inject(Hash.new(0)) {|h, (_, cmd)| h[cmd[:type]] += 1; h}
      type_and_percentage = counts.keys.sort.map{|type| {:type => type, :count => counts[type]}}

      if options[:csv]
        csv_str = CSV.generate do |csv|
          csv << header
          sorted_cmd.each {|cmd| csv << attrs.map{|attr| cmd[attr]}}

          csv << []
          csv << count_header
          type_and_percentage.each {|type| csv << count_attrs.map{|attr| type[attr]}}
        end
        display(csv_str)
      else
        display_table(sorted_cmd, attrs, header)
        display("")
        display_table(type_and_percentage, count_attrs, count_header)
      end
    end
390061
def method_missing(method, *args, &block)
      
      attribute = ActiveSupport::Inflector.camelize(method.to_s, false)
  
      if attribute =~ /=$/
        attribute = attribute.chop
        return super unless self.attributes.include?(attribute)
        self.changed_attributes[attribute] = args[0]
        self.attributes[attribute] = args[0]
      else
        return super unless self.attributes.include?(attribute)
        self.attributes[attribute]
      end 
            
    end
204555
def method_missing(meth, *args, &block)
      # Check to see if it can be evaluated
      if(matches? meth)
        #Defines the method and caches it to the class
        self.class.send(:define_method, meth) do
          # Splits the method and parameter. See formatize and directionize
          @csf::config()::getStringArray(meth.to_s.to_java_name).to_a
        end
        # calls the method
        send meth, *args, &block
      else
        super
      end
    end
868201
def method_missing(m, *args, &block)
      if m.to_s.end_with?("_url") || m.to_s.end_with?("_path")
        "/"
      else
        super
      end
    end
1121535
def method_missing(name, *args, &block)
      if self.class.resources.keys.include?(name)
        resources[name] ||= self.class.resources[name].new(self)
        resources[name]
      else
        super
      end
    end
360659
def method_missing(meth, *args, &block)
      if !loaded?
        self.loaded = true
        reload
        send(meth, *args, &block)
      else
        super
      end
    end
1120907
def method_missing(method, *args)
      super unless args.empty?

      if @ifds.first.respond_to?(method)
        @ifds.first.send(method)
      elsif TAGS.include?(method)
        @ifds.first.to_hash[method]
      else
        super
      end
    end
1011599
def method_missing(method_name, *args, &block)
      load
      @collection.send(method_name.to_sym, *args, &block)
    end