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

#group ⇒ String

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_id ⇒ Integer

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

#name ⇒ String

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

#unit ⇒ String

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