r 0.0.2 → 0.0.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.
- data/README +3 -0
- data/Rakefile +1 -1
- data/lib/r.rb +19 -13
- data/r.gemspec +1 -1
- metadata +3 -3
data/README
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'echoe'
|
|
4
4
|
|
5
5
|
# Copied from RyanBates: http://railscasts.com/episodes/135-making-a-gem
|
6
6
|
|
7
|
-
Echoe.new('r', '0.0.
|
7
|
+
Echoe.new('r', '0.0.3' ) do |p|
|
8
8
|
p.description = "My second gem, and most minimalistic."
|
9
9
|
p.url = "http://github.com/palladius/r"
|
10
10
|
p.author = "Riccardo C."
|
data/lib/r.rb
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
|
2
2
|
# lib/r.rb
|
3
3
|
module R
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
|
5
|
+
def self.included(base)
|
6
|
+
base.extend ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
def ensure_unique(name)
|
10
|
+
begin
|
11
|
+
self[name] = yield
|
12
|
+
end while self.class.exists?(name => self[name])
|
13
|
+
end
|
14
|
+
|
15
|
+
module ClassMethods
|
15
16
|
#
|
16
17
|
# def uniquify(*args, &block)
|
17
18
|
# options = { :length => 8, :chars => ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a }
|
@@ -28,8 +29,13 @@ module R
|
|
28
29
|
# end
|
29
30
|
# end
|
30
31
|
# end
|
31
|
-
#
|
32
|
-
|
32
|
+
#
|
33
|
+
|
34
|
+
def carlessify
|
35
|
+
puts 'TODO :)'
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
class ActiveRecord::Base
|
data/r.gemspec
CHANGED
metadata
CHANGED