Sha256: 1c2cd1a514390715810df7e715486542c4560f4b256c575f48f00f2907692e8a

Contents?: true

Size: 630 Bytes

Versions: 8

Compression:

Stored size: 630 Bytes

Contents

module NflData
  module API
    class Player

      def initialize
        @parser = PlayerParser.new
      end

      def get(position)
        @parser.get_by_position(position).to_json
      end

      class << self

        def get_all
          self.new.get(:all)
        end

        def get_quarterbacks
          self.new.get(:quarterbacks)
        end

        def get_runningbacks
          self.new.get(:runningbacks)
        end

        def get_wide_receivers
          self.new.get(:wide_receivers)
        end

        def get_tight_ends
          self.new.get(:tight_ends)
        end

      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nfl_data-0.0.10 lib/nfl_data/api/player.rb
nfl_data-0.0.9 lib/nfl_data/api/player.rb
nfl_data-0.0.8 lib/nfl_data/api/player.rb
nfl_data-0.0.7 lib/nfl_data/api/player.rb
nfl_data-0.0.6 lib/nfl_data/api/player.rb
nfl_data-0.0.5 lib/nfl_data/api/player.rb
nfl_data-0.0.4 lib/nfl_data/api/player.rb
nfl_data-0.0.3 lib/nfl_data/api/player.rb