Class: MLB::Sport

Inherits:
Shale::Mapper
  • Object
show all
Includes:
Comparable, ComparableByAttribute
Defined in:
lib/mlb/sport.rb

Overview

Represents a sport (e.g., MLB, Minor League Baseball)

Instance Method Summary collapse

Methods included from ComparableByAttribute

#<=>

Instance Method Details

#active?Boolean

Checks if the sport is active

Examples:

sport.active? #=> true

Returns:

  • (Boolean)

    whether the sport is active



32
# File 'lib/mlb/sport.rb', line 32

def active? = active

#comparable_attributeSymbol

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the attribute used for sorting

Returns:

  • (Symbol)

    the attribute used for comparison



16
# File 'lib/mlb/sport.rb', line 16

def comparable_attribute = :sort_order