Class: MLB::Metric

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/mlb/metric.rb

Overview

Represents a statcast metric

Instance Attribute Summary collapse

Instance Attribute Details

#groupString

Returns the metric group

Examples:

metric.group #=> "hitting"


31
# File 'lib/mlb/metric.rb', line 31

attribute :group, Shale::Type::String

#metric_idInteger

Returns the unique metric identifier

Examples:

metric.metric_id #=> 1


23
# File 'lib/mlb/metric.rb', line 23

attribute :metric_id, Shale::Type::Integer

#nameString

Returns the metric name

Examples:

metric.name #=> "launchSpeed"


15
# File 'lib/mlb/metric.rb', line 15

attribute :name, Shale::Type::String

#unitString

Returns the measurement unit

Examples:

metric.unit #=> "MPH"


39
# File 'lib/mlb/metric.rb', line 39

attribute :unit, Shale::Type::String