Class: MLB::Division

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

Overview

Represents a division (e.g., AL East, NL West)

Instance Method Summary collapse

Methods included from ComparableByAttribute

#<=>

Instance Method Details

#active?Boolean

Checks if the division is active

Examples:

division.active? #=> true

Returns:

  • (Boolean)

    whether the division is active



38
# File 'lib/mlb/division.rb', line 38

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



18
# File 'lib/mlb/division.rb', line 18

def comparable_attribute = :sort_order

#wildcard?Boolean

Checks if the division has a wildcard

Examples:

division.wildcard? #=> true

Returns:

  • (Boolean)

    whether the division has a wildcard



46
# File 'lib/mlb/division.rb', line 46

def wildcard? = has_wildcard