Class: Stattleship::Params::PitchesParams

Inherits:
GameTimeParams show all
Defined in:
lib/stattleship/params/pitches_params.rb

Instance Attribute Summary collapse

Attributes inherited from GameTimeParams

#interval_type, #on, #season_id, #since, #status, #week

Attributes inherited from QueryParams

#page, #per_page, #season_id

Instance Method Summary collapse

Methods inherited from QueryParams

#query, #validate

Instance Attribute Details

#game_idObject

Returns the value of attribute game_id


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def game_id
  @game_id
end

#hit_locationObject

Returns the value of attribute hit_location


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def hit_location
  @hit_location
end

#hit_typeObject

Returns the value of attribute hit_type


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def hit_type
  @hit_type
end

#hitter_idObject

Returns the value of attribute hitter_id


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def hitter_id
  @hitter_id
end

#hitter_team_idObject

Returns the value of attribute hitter_team_id


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def hitter_team_id
  @hitter_team_id
end

#inningObject

Returns the value of attribute inning


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def inning
  @inning
end

#lower_speedObject

Returns the value of attribute lower_speed


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def lower_speed
  @lower_speed
end

#pitch_outcome_typeObject

Returns the value of attribute pitch_outcome_type


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def pitch_outcome_type
  @pitch_outcome_type
end

#pitch_typeObject

Returns the value of attribute pitch_type


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def pitch_type
  @pitch_type
end

#pitcher_idObject

Returns the value of attribute pitcher_id


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def pitcher_id
  @pitcher_id
end

#speedObject

Returns the value of attribute speed


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def speed
  @speed
end

#speed_and_overObject

Returns the value of attribute speed_and_over


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def speed_and_over
  @speed_and_over
end

#speed_and_underObject

Returns the value of attribute speed_and_under


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def speed_and_under
  @speed_and_under
end

#team_idObject

Returns the value of attribute team_id


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def team_id
  @team_id
end

#upper_speedObject

Returns the value of attribute upper_speed


4
5
6
# File 'lib/stattleship/params/pitches_params.rb', line 4

def upper_speed
  @upper_speed
end

Instance Method Details

#paramsObject


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/stattleship/params/pitches_params.rb', line 20

def params
  super.merge('game_id' => game_id,
              'hitter_id' => hitter_id,
              'pitcher_id' => pitcher_id,
              'team_id' => team_id,
              'hitter_team_id' => hitter_team_id,
              'inning' => inning,
              'pitch_outcome_type' => pitch_outcome_type,
              'lower_speed' => lower_speed,
              'upper_speed' => upper_speed,
              'speed' => speed,
              'speed_and_over' => speed_and_over,
              'speed_and_under' => speed_and_under,
              'pitch_type' => pitch_type,
              'hit_location' => hit_location,
              'hit_type' => hit_type,
             )
end