Module: Curse

Included in:
Object
Defined in:
lib/curse.rb,
lib/curse/version.rb

Defined Under Namespace

Classes: Comic

Constant Summary collapse

VERSION =
"1.0.0"
@@curses =
{}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.language=(handle) ⇒ Object



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

def self.language=(handle)
  @@active = @@curses[handle]
end

.register(handle, klass) ⇒ Object



6
7
8
# File 'lib/curse.rb', line 6

def self.register(handle, klass)
  @@curses[handle] = klass.new
end

Instance Method Details

#adverbsObject



20
21
22
# File 'lib/curse.rb', line 20

def adverbs
  rand(4).times.map { @@active.adverb }
end

#cursesObject



14
15
16
17
18
# File 'lib/curse.rb', line 14

def curses
  rand(4).times.map do
    @@active.curse
  end.join(' ') + '!'
end