Sha256: 7b92b4c3dfee51b1aae597cc460eebf5f265d7f3a4cd73010d7f4b08e2fb76bf

Contents?: true

Size: 926 Bytes

Versions: 13

Compression:

Stored size: 926 Bytes

Contents

# frozen_string_literal: true

module AhlScraper
  module Games
    class Star < Resource
      def id
        @id ||= @raw_data[:player][:info][:id]
      end

      def number
        @number ||= @opts[:number]
      end

      def first_name
        @first_name ||= @raw_data[:player][:info][:firstName]
      end

      def last_name
        @last_name ||= @raw_data[:player][:info][:lastName]
      end

      def team_id
        @team_id ||= @raw_data[:team][:id]
      end

      def jersey_name
        @jersey_name ||= @raw_data[:player][:info][:jerseyNumber]
      end

      def position
        @position ||= @raw_data[:player][:info][:position]
      end

      def birthdate
        @birthdate ||= @raw_data[:player][:info][:birthDate]
      end

      def goalie?
        @goalie ||= @raw_data[:isGoalie]
      end

      def image_url
        @image_url ||= @raw_data[:playerImage]
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ahl_scraper-0.4.1 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.4.0 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.8 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.7 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.6 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.5 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.4 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.3 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.2 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.1 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.3.0 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.2.0 lib/ahl_scraper/resources/games/star.rb
ahl_scraper-0.1.1 lib/ahl_scraper/resources/games/star.rb