<commit_before>module Interactors
  module Users
    class Following
      include Pavlov::Interactor

      arguments :user_name, :skip, :take

      def authorized?
        !! pavlov_options[:current_user]
      end

      def validate
        validate_nonempty_string :user_name, user_name
        validate_integer :skip, skip
        validate_integer :take, take
      end

      def execute
        user = query(:'user_by_username', username: user_name)

        graph_user_ids = query(:'users/following_graph_user_ids',
                                  graph_user_id: user.graph_user_id.to_s)
        users = query(:'users_by_graph_user_ids',
                          graph_user_ids: graph_user_ids)

        count = users.length
        users = users.drop(skip).take(take)

        return users, count
      end
    end
  end
end<commit_msg>Cleaned up code a little<commit_after>module Interactors
  module Users
    class Following
      include Pavlov::Interactor

      arguments :user_name, :skip, :take

      def authorized?
        !!pavlov_options[:current_user]
      end

      def validate
        validate_nonempty_string :user_name, user_name
        validate_integer :skip, skip
        validate_integer :take, take
      end

      def execute
        user = query(:'user_by_username', username: user_name)

        graph_user_ids = query(:'users/following_graph_user_ids',
                                  graph_user_id: user.graph_user_id.to_s)
        users = query(:'users_by_graph_user_ids',
                          graph_user_ids: graph_user_ids)

        [users[skip, take], users.length]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0696969696969697, 'fraction_numerical': 0.0, 'mean_word_length': 2.168905950095969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3308769', 'n_tokens_mistral': 485, 'n_tokens_neox': 464, 'n_words': 105}