collector 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/collector.gemspec +2 -0
- data/lib/collector/model.rb +6 -4
- data/lib/collector/version.rb +1 -1
- metadata +19 -3
data/README.md
CHANGED
data/collector.gemspec
CHANGED
data/lib/collector/model.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "active_support/core_ext/hash/keys"
|
2
|
+
|
1
3
|
module Collector
|
2
4
|
module Model
|
3
5
|
|
@@ -6,14 +8,14 @@ module Collector
|
|
6
8
|
end
|
7
9
|
|
8
10
|
def initialize(attributes = {})
|
11
|
+
attributes.symbolize_keys!
|
12
|
+
|
9
13
|
attributes.each do |attribute, value|
|
10
14
|
send("#{attribute}=", value) if methods.include? "#{attribute}=".to_sym
|
11
15
|
end
|
12
16
|
|
13
|
-
created_at
|
14
|
-
updated_at
|
15
|
-
instance_variable_set("@created_at", created_at) if created_at
|
16
|
-
instance_variable_set("@updated_at", updated_at) if updated_at
|
17
|
+
instance_variable_set("@created_at", attributes[:created_at]) if attributes[:created_at]
|
18
|
+
instance_variable_set("@updated_at", attributes[:updated_at]) if attributes[:updated_at]
|
17
19
|
end
|
18
20
|
|
19
21
|
def touch
|
data/lib/collector/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-11-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.2.8
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.8
|
14
30
|
description: An implementation of the Repository Pattern
|
15
31
|
email:
|
16
32
|
- brandon@anti-pattern.com
|