Sha256: 84176af426c2afe5326268eed21984636f2d2efb5319df010b07a20141f2c9d9
Contents?: true
Size: 873 Bytes
Versions: 9
Compression:
Stored size: 873 Bytes
Contents
module SportDB class Opts def merge_commander_options!( options = {} ) @db_path = options[:dbpath] if options[:dbpath].present? @db_name = options[:dbname] if options[:dbname].present? @data_path = options[:include] if options[:include].present? @event = options[:event] if options[:event].present? @world_data_path = options[:worldinclude] if options[:worldinclude].present? end def db_path @db_path || '.' end def db_name @db_name || 'sport.db' end def event=(value) @event = value end def event @event # NB: option has no default; return nil ## || '.' end def data_path=(value) @data_path = value end def data_path @data_path || '.' end def world_data_path @world_data_path # NB: option has no default; return nil end end # class Opts end # module SportDB
Version data entries
9 entries across 9 versions & 1 rubygems