<commit_before>module Cta
  module Bus
    class Arrival
      attr_accessor :predictions

      def initialize( args )
        options = {}
        options["stpid"] = args[:stop_ids].join(",")
        options = options.merge key: BUS_API_KEY
        @response = Bus.fetch('getpredictions', query: options).parsed_response
        @predictions = build_predictions(@response)
      end


      private
      def build_predictions( hash )
        hash["bustime_response"]["prd"].map { |prd| Prediction.new prd }
      end
    end

    class Prediction
      attr_accessor :timestamp, :predicted_time, :stop_name, :vid, :route_id, :route_direction, :destination

      def initialize( args )
        @timestamp        = Time.parse(args["tmstmp"])
        @predicted_time   = Time.parse(args["prdtm"])
        @stop_name        = args["stpnm"]
        @vid              = args["vid"]
        @route_id         = args["rt"]
        @route_direction  = args["rtdir"]
        @destination      = args["des"]
      end
    end
  end
end<commit_msg>added some extra attributes to prediction<commit_after>module Cta
  module Bus
    class Arrival
      attr_accessor :predictions

      def initialize( args )
        options = {}
        options["stpid"] = args[:stop_ids].join(",")
        options = options.merge key: BUS_API_KEY
        @response = Bus.fetch('getpredictions', query: options).parsed_response
        @predictions = build_predictions(@response)
      end


      private
      def build_predictions( hash )
        hash["bustime_response"]["prd"].map { |prd| Prediction.new prd }
      end
    end

    class Prediction
      attr_accessor :timestamp, :predicted_time, :stop_name, :vid, :route_id, :route_direction, :destination, :stop_id, :prediction_type

      def initialize( args )
        @timestamp        = Time.parse(args["tmstmp"])
        @predicted_time   = Time.parse(args["prdtm"])
        @stop_name        = args["stpnm"]
        @vid              = args["vid"]
        @route_id         = args["rt"]
        @route_direction  = args["rtdir"]
        @destination      = args["des"]
        @stop_id          = args["stpid"]
        @prediction_type  = args["typ"]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11541929666366095, 'fraction_numerical': 0.0, 'mean_word_length': 2.292284866468843, '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': '4402769', 'n_tokens_mistral': 669, 'n_tokens_neox': 660, 'n_words': 142}