Sha256: 3c360fa6b65bc09a5060361ba49d77540214f6cd3ec9373f38bd9fd0956191b5
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
require 'baseball/version' require 'baseball/batting' require 'baseball/pitching' require 'baseball/fielding' require 'baseball/running' module Baseball #table of contents #batter stats #pitcher stats # fielder stats def self.version_number Baseball::VERSION end #batting stats def self.batting_average(player_hash) include Batting player = Batter.new(player_hash) player.batting_average end def self.obp(player_hash) include Batting player = Batter.new(player_hash) player.obp end def self.slg(player_hash) include Batting player = Batter.new(player_hash) player.slugging_percentage end def self.ops(player_hash) include Batting player = Batter.new(player_hash) player.ops end #pitcher stats def self.era(pitcher_hash) include Pitching pitcher = Pitcher.new(pitcher_hash) pitcher.era end def self.whip(pitcher_hash) include Pitching pitcher = Pitcher.new(pitcher_hash) pitcher.whip end #fielder stats def self.fielding_percentage(fielder_hash) include Fielding fielder = Fielder.new(fielder_hash) fielder.fielding_percentage end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
baseball-0.1.0 | lib/baseball.rb |