can_has_fixtures 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,9 @@
1
1
  class Fixnum
2
- def random
2
+ def random(&block)
3
3
  Random.chain(self)
4
4
  end
5
+
6
+ def of(&block)
7
+ (1..self).to_a.collect(&block)
8
+ end
5
9
  end
@@ -2,4 +2,8 @@ class Range
2
2
  def random
3
3
  entries.random
4
4
  end
5
+
6
+ def of(&block)
7
+ entries.random.of(&block)
8
+ end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module CanHasFixtures
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: can_has_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors: []
7
7