Module: Bazaar

Defined in:
lib/bazaar.rb,
lib/bazaar/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.adjObject



7
8
9
# File 'lib/bazaar.rb', line 7

def self.adj
  get_item("adj").humanize
end

.get_item(filename) ⇒ Object



25
26
27
# File 'lib/bazaar.rb', line 25

def self.get_item(filename)
  File.read(File.expand_path("../bazaar/#{filename}.txt", __FILE__)).split("\n").sample
end

.herokuObject



22
23
24
# File 'lib/bazaar.rb', line 22

def self.heroku
  get_item("superadj") + '-' + get_item("superitems") + '-' + rand(0-9999).to_s
end

.itemObject



4
5
6
# File 'lib/bazaar.rb', line 4

def self.item
  get_item("items").humanize
end

.objectObject



10
11
12
# File 'lib/bazaar.rb', line 10

def self.object
  (get_item("adj") + ' ' + get_item("items")).humanize
end

.super_adjObject



16
17
18
# File 'lib/bazaar.rb', line 16

def self.super_adj
  get_item("superadj").humanize
end

.super_itemObject



13
14
15
# File 'lib/bazaar.rb', line 13

def self.super_item
  get_item("superitems").humanize
end

.super_objectObject



19
20
21
# File 'lib/bazaar.rb', line 19

def self.super_object
  (get_item("superadj") + ' ' + get_item("superitems")).humanize
end