lib/baseball/fielding.rb in baseball-0.3.1 vs lib/baseball/fielding.rb in baseball-0.4.0
- old
+ new
@@ -1,14 +1,9 @@
-require 'baseball/helper'
+require 'baseball/player'
module Fielding
- class Fielder
- include Helper
- attr_accessor :player_hash
- def initialize(player_hash)
- @player = player_hash
- end
+ class Fielder < Player::PlayerTemplate
def fielding_percentage
plays = @player[:put_outs] + @player[:assists]
plays_plus_errors = plays + @player[:errors]
player_avg = plays.to_f / plays_plus_errors.to_f