job_interview 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ require 'prime'
2
+
3
+ module JobInterview
4
+ module Primes
5
+
6
+ def primes(n)
7
+ p = Prime.each
8
+
9
+ acc = []
10
+ n.times do
11
+ acc << p.next
12
+ end
13
+
14
+ return acc
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ module JobInterview
2
+ module Quine
3
+
4
+ def quine(file)
5
+ return File.read(file)
6
+ end
7
+
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: job_interview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2012-04-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faker
17
- requirement: &2152051700 !ruby/object:Gem::Requirement
17
+ requirement: &2152357260 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.9.5
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152051700
25
+ version_requirements: *2152357260
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &2152050980 !ruby/object:Gem::Requirement
28
+ requirement: &2152356380 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 2.9.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2152050980
36
+ version_requirements: *2152356380
37
37
  description: Programmer job interview answers, packaged for your convenience. Fibonacci,
38
38
  FizzBuzz, and more! A project from BohConf 2012.
39
39
  email:
@@ -49,6 +49,8 @@ files:
49
49
  - lib/job_interview/knapsack.rb
50
50
  - lib/job_interview/answer.rb
51
51
  - lib/job_interview/questions.rb
52
+ - lib/job_interview/primes.rb
53
+ - lib/job_interview/quine.rb
52
54
  - spec/fibonacci_spec.rb
53
55
  - spec/fizz_buzz_spec.rb
54
56
  - spec/primes_spec.rb