attribution 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -0
- data/attribution.gemspec +1 -1
- data/lib/attribution.rb +6 -1
- data/lib/attribution/version.rb +1 -1
- data/test/attribution_test.rb +0 -4
- metadata +2 -2
data/Rakefile
CHANGED
data/attribution.gemspec
CHANGED
data/lib/attribution.rb
CHANGED
@@ -11,7 +11,12 @@ module Attribution
|
|
11
11
|
def initialize(attrs={})
|
12
12
|
attrs = JSON.parse(attrs) if attrs.is_a?(String)
|
13
13
|
attrs.each do |k,v|
|
14
|
-
|
14
|
+
setter = "#{k}="
|
15
|
+
if respond_to?(setter)
|
16
|
+
send(setter, v)
|
17
|
+
else
|
18
|
+
instance_variable_set("@#{k}", v)
|
19
|
+
end
|
15
20
|
end
|
16
21
|
end
|
17
22
|
|
data/lib/attribution/version.rb
CHANGED
data/test/attribution_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attribution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|