Module: RandallClassSugar

Defined in:
lib/randall/sugar.rb

Overview

copyright © 2010, Diego Che

Instance Method Summary collapse

Instance Method Details

#arraysObject



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

def arrays
  self.new(Array)
end

#floatsObject



15
16
17
# File 'lib/randall/sugar.rb', line 15

def floats
  self.new(Float)
end

#hashesObject



23
24
25
# File 'lib/randall/sugar.rb', line 23

def hashes
  self.new(Hash)
end

#instances_of(cls) ⇒ Object



27
28
29
# File 'lib/randall/sugar.rb', line 27

def instances_of(cls)
  self.new(cls)
end

#integersObject



11
12
13
# File 'lib/randall/sugar.rb', line 11

def integers
  self.new(Integer)
end

#stringsObject



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

def strings
  self.new(String)
end