Sha256: d56ded11deb87d7aaf8c90664aefa9e8b0cd3d6337ef2975a1400aa49bba17d2
Contents?: true
Size: 683 Bytes
Versions: 28
Compression:
Stored size: 683 Bytes
Contents
module BeerDb 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? @world_data_path = options[:worldinclude] if options[:worldinclude].present? end def db_path @db_path || '.' end def db_name @db_name || 'beer.db' 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 BeerDb
Version data entries
28 entries across 28 versions & 1 rubygems