class Sports::Country
note: check that shape/structure/fields/attributes match
the ActiveRecord model !!!!
Attributes
alt_names[RW]
code[R]
note: is read-only/immutable for now - why? why not?
add cities (array/list) - why? why not?
key[R]
note: is read-only/immutable for now - why? why not?
add cities (array/list) - why? why not?
name[R]
note: is read-only/immutable for now - why? why not?
add cities (array/list) - why? why not?
Public Class Methods
new( key: nil, name:, code:, tags: [] )
click to toggle source
# File lib/sportdb/structs/structs/country.rb, line 14 def initialize( key: nil, name:, code:, tags: [] ) ## note: auto-generate key "on-the-fly" if missing for now - why? why not? ## note: quick hack - auto-generate key, that is, remove all non-ascii chars and downcase @key = key || name.downcase.gsub( /[^a-z]/, '' ) @name, @code = name, code @alt_names = [] @tags = tags end