Sha256: 5a890324e8011efd209b958b491b97fe0a6775f173bc859fe8927294be9bcf8e
Contents?: true
Size: 300 Bytes
Versions: 10
Compression:
Stored size: 300 Bytes
Contents
module MLBGameday class League attr_reader :name, :divisions def initialize(name, divisions) @name = name @divisions = divisions end def division(name) fail 'Invalid division' unless %i(East Central West).include?(name) @divisions[name] end end end
Version data entries
10 entries across 10 versions & 1 rubygems