Sha256: 11680c9037d407814cc6a92e7ad7e59d960fc2e050d2691a12d734cebe94f06d

Contents?: true

Size: 951 Bytes

Versions: 14

Compression:

Stored size: 951 Bytes

Contents

module Sportradar
  module Api
    module Football
      class Ncaafb
        class Play < Sportradar::Api::Football::Play


          def parsed_ending
            @parsed_ending ||= parse_description_for_drive_end
          end

        private

          def parse_description_for_drive_end
            parsed_ending = case @description
            when /intercepted/i
              :interception
            when /extra point is good/i
              :touchdown
            # when missed extra point
            when /punts/i
              :punt
            when /Field Goal is No Good. blocked/i
              :fg
            # when missed field goal
            when /Field Goal is Good/i
              :fg
            when "End of 1st Half"
              :end_of_half
            else
              #
            end
            if parsed_ending
              parsed_ending
            end
          end

        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sportradar-api-0.11.15 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.14 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.13 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.12 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.11 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.10 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.9 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.8 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.7 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.6 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.5 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.4 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.3 lib/sportradar/api/football/ncaafb/play.rb
sportradar-api-0.11.1 lib/sportradar/api/football/ncaafb/play.rb