Sha256: 46ff98d6330a7f7f742de4d3a9eb3c8e2d6735ce58a59df05e38c748e94670ca

Contents?: true

Size: 271 Bytes

Versions: 6

Compression:

Stored size: 271 Bytes

Contents

require "yaml"

def gameidea
  data = YAML::load_file File.expand_path(File.join(File.dirname(__FILE__), "data.yml"))
  
  who = data['Who'].sample
  where = data['Where'].sample
  what = data['What'].sample
  
  return { :who => who, :where => where, :what => what }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gameidea-3.6.1 lib/gameidea.rb
gameidea-3.6.0 lib/gameidea.rb
gameidea-3.5.0 lib/gameidea.rb
gameidea-3.0.0 lib/gameidea.rb
gameidea-2.0.0 lib/gameidea.rb
gameidea-1.1.0 lib/gameidea.rb