<commit_before>module ShopifyAPI
  # Shop object. Use Shop.current to receive 
  # the shop.
  class Shop < Base
    def self.current
      find(:one, from: "/admin/shop.#{format.extension}")
    end

    def metafields
      Metafield.find(:all)
    end
    
    def add_metafield(metafield)
      raise ArgumentError, "You can only add metafields to resource that has been saved" if new?      
      metafield.save
      metafield
    end
    
    def events
      Event.find(:all)
    end
  end               
end<commit_msg>Allow options to be passed to shop fetching<commit_after>module ShopifyAPI
  # Shop object. Use Shop.current to receive 
  # the shop.
  class Shop < Base
    def self.current(options={})
      find(:one, options.merge({from: "/admin/shop.#{format.extension}"}))
    end

    def metafields
      Metafield.find(:all)
    end
    
    def add_metafield(metafield)
      raise ArgumentError, "You can only add metafields to resource that has been saved" if new?      
      metafield.save
      metafield
    end
    
    def events
      Event.find(:all)
    end
  end               
end
{'fraction_non_alphanumeric': 0.07892376681614349, 'fraction_numerical': 0.0, 'mean_word_length': 2.1794871794871793, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4019983', 'n_tokens_mistral': 342, 'n_tokens_neox': 335, 'n_words': 104}