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"

Returns:

  • (String)

    the metric group



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

Returns:

  • (Integer)

    the unique metric identifier



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

attribute :metric_id, Shale::Type::Integer

#nameString

Returns the metric name

Examples:

metric.name #=> "launchSpeed"

Returns:

  • (String)

    the metric name



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

attribute :name, Shale::Type::String

#unitString

Returns the measurement unit

Examples:

metric.unit #=> "MPH"

Returns:

  • (String)

    the measurement unit



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

attribute :unit, Shale::Type::String