<commit_before>module GoodData
  class Report < GoodData::MdObject 

    root_key :report

    class << self
      def [](id)
        if id == :all
          GoodData.get(GoodData.project.md['query'] + '/reports/')['query']['entries']
        else 
          super
        end
      end
            
      def create(options={})
        title = options[:title]
        summary = options[:summary] || ""
        rd = options[:rd] || ReportDefinition.create(:top => options[:top], :left => options[:left])
        rd.save

        report = Report.new({
           "report" => {
              "content" => {
                 "domains" => [],
                 "definitions" => [rd.uri]
              },
              "meta" => {
                 "tags" => "",
                 "deprecated" => "0",
                 "summary" => summary,
                 "title" => title
              }
           }
        })        
      end
    end

# ----

    def title=(a_title)
      @json["report"]["meta"]["title"] = a_title
    end

    def summary=(a_summary)
      @json[:report][:meta][:summary] = a_summary
    end

    def add_definition(a_definition)
      @json[:report][:content][:definitions] << a_definition
    end
    
# ----



    def results
      content["results"]<commit_msg>Removing unused methods<commit_after>module GoodData
  class Report < GoodData::MdObject 

    root_key :report

    class << self
      def [](id)
        if id == :all
          GoodData.get(GoodData.project.md['query'] + '/reports/')['query']['entries']
        else 
          super
        end
      end
            
      def create(options={})
        title = options[:title]
        summary = options[:summary] || ""
        rd = options[:rd] || ReportDefinition.create(:top => options[:top], :left => options[:left])
        rd.save

        report = Report.new({
           "report" => {
              "content" => {
                 "domains" => [],
                 "definitions" => [rd.uri]
              },
              "meta" => {
                 "tags" => "",
                 "deprecated" => "0",
                 "summary" => summary,
                 "title" => title
              }
           }
        })        
      end
    end

    def results
      content["results"]
{'fraction_non_alphanumeric': 0.15043859649122807, 'fraction_numerical': 0.0008771929824561404, 'mean_word_length': 1.366182572614108, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '7562734', 'n_tokens_mistral': 636, 'n_tokens_neox': 614, 'n_words': 122}