<commit_before>class Transloadit
  autoload :Robot, 'transloadit/robot'
  
  attr_accessor :key
  attr_accessor :secret
  
  #
  # Creates a new instance of the Transloadit API.
  #
  # @param [Hash] options a hash of options, which can be any of:
  #
  #   [key]    your auth key from the 
  #            {credentials}[https://transloadit.com/accounts/credentials]
  #            page (required)
  #   [secret] your auth secret from the
  #            {credentials}[https://transloadit.com/accounts/credentials]
  #            page, for signing requests (optional)
  #
  def initialize(options = {})
    self.key    = options[:key]
    self.secret = options[:secret]
    
    _ensure_key_provided
  end
  
  #
  # Creates a Transloadit::Robot describing a step in an upload assembly.
  #
  # @param [String] type the type of robot to create (e.g., '/image/resize')
  # @param [Hash] options a hash of options to customize the robot.
  #
  def robot(type, options = {})
    Transloadit::Robot.new(type, options)
  end
  
  private
  
  def _ensure_key_provided
    unless self.key
      raise ArgumentError, 'an authentication key must be provided'
    end
  end
end<commit_msg>Better documentation<commit_after>class Transloadit
  autoload :Robot, 'transloadit/robot'
  
  # @return [String] your Transloadit auth key
  attr_accessor :key
  
  # @return [String] your Transloadit auth secret, for signing requests
  attr_accessor :secret
  
  #
  # Creates a new instance of the Transloadit API.
  #
  # @param [Hash] options a hash of options, which can be any of:
  #
  #   [key]    your auth key from the 
  #            {credentials}[https://transloadit.com/accounts/credentials]
  #            page (required)
  #   [secret] your auth secret from the
  #            {credentials}[https://transloadit.com/accounts/credentials]
  #            page, for signing requests (optional)
  #
  def initialize(options = {})
    self.key    = options[:key]
    self.secret = options[:secret]
    
    _ensure_key_provided
  end
  
  #
  # Creates a Transloadit::Robot describing a step in an upload assembly.
  #
  # @param  [String] type the type of robot to create (e.g., '/image/resize')
  # @param  [Hash]   options a hash of options to customize the robot.
  # @return [Robot]  the created Robot
  #
  def robot(type, options = {})
    Transloadit::Robot.new(type, options)
  end
  
  private
  
  def _ensure_key_provided
    unless self.key
      raise ArgumentError, 'an authentication key must be provided'
    end
  end
end
{'fraction_non_alphanumeric': 0.09454113924050633, 'fraction_numerical': 0.0, 'mean_word_length': 2.7466666666666666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3261100', 'n_tokens_mistral': 804, 'n_tokens_neox': 798, 'n_words': 244}