lib/baseball.rb in baseball-1.2.0 vs lib/baseball.rb in baseball-1.3.0
- old
+ new
@@ -45,11 +45,11 @@
def self.runs_created(player_hash)
include Batting
player = Batter.new(player_hash)
player.runs_created
- end
+ end
#pitching stats
def self.era(pitcher_hash)
include Pitching
@@ -65,9 +65,21 @@
def self.k_per_nine(pitcher_hash)
include Pitching
pitcher = Pitcher.new(pitcher_hash)
pitcher.k_per_nine
+ end
+
+ def self.bb_per_nine(pitcher_hash)
+ include Pitching
+ pitcher = Pitcher.new(pitcher_hash)
+ pitcher.bb_per_nine
+ end
+
+ def self.so_per_bb(pitcher_hash)
+ include Pitching
+ pitcher = Pitcher.new(pitcher_hash)
+ pitcher.so_per_bb
end
#fielding stats
def self.fielding_percentage(fielder_hash)