Sha256: b67ef9d2caba3388b938f35e2fb11a39025457dd6af4a0ec8c8ce565113697e6

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8


module SeasonHelper ## use Helpers why? why not?

  ##############################################
  ### deprecated!!! use new Season class!!!
  ##   this code will get removed!!!!
  ###################################################

  def prev( str )   SportDb::Import::Season.new( str ).prev;  end
  def key( str )    SportDb::Import::Season.new( str ).key;   end
  def directory( str, format: nil )  SportDb::Import::Season.new( str ).directory( format: format );  end

  ## note: new start_year now returns an integer number (no longer a string)!!!
  def start_year( str )  SportDb::Import::Season.new( str ).start_year;  end
  ## note: new end_year now returns an integer number (no longer a string)!!!
  ##       if now end_year (year? == true) than returns nil (no longer the start_year "as fallback")!!!
  def end_year( str )   SportDb::Import::Season.new( str ).end_year;  end
end  # module SeasonHelper


module SeasonUtils
  extend SeasonHelper
  ##  lets you use SeasonHelper as "globals" eg.
  ##     SeasonUtils.prev( season ) etc.
end # SeasonUtils

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sportdb-formats-1.1.1 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.1.0 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.6 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.5 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.4 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.3 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.2 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.1 lib/sportdb/formats/season_utils.rb
sportdb-formats-1.0.0 lib/sportdb/formats/season_utils.rb
sportdb-formats-0.4.0 lib/sportdb/formats/season_utils.rb
sportdb-formats-0.3.0 lib/sportdb/formats/season_utils.rb