<commit_before>module Gumroad
  class Link
    attr_reader :json
    attr_accessor :id, :name, :url, :description, :price
    
    def initialize(session, json)
      @session = session
      [:id, :name, :url, :description, :price].each do |attribute|
        instance_variable_set(:"@#{attribute}", json[attribute.to_s])
      end
    end

    def save
      params = {name: name, url: url, description: description, price: price}
      json = @session.post("/links", params)['link']
      self
    end

    def destroy
      @session.delete("/links/#{id}")
    end
  end
end<commit_msg>got rid of unnecessary json attribute<commit_after>module Gumroad
  class Link
    attr_accessor :id, :name, :url, :description, :price
    
    def initialize(session, json)
      @session = session
      [:id, :name, :url, :description, :price].each do |attribute|
        instance_variable_set(:"@#{attribute}", json[attribute.to_s])
      end
    end

    def save
      params = {name: name, url: url, description: description, price: price}
      @session.post("/links", params)
      self
    end

    def destroy
      @session.delete("/links/#{id}")
    end
  end
end
{'fraction_non_alphanumeric': 0.13047210300429185, 'fraction_numerical': 0.0, 'mean_word_length': 2.8609271523178808, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '190725', 'n_tokens_mistral': 360, 'n_tokens_neox': 357, 'n_words': 101}