lazy_records 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lazy_records.gemspec +2 -2
- data/lib/adapters/sqlite3.rb +1 -0
- data/lib/record.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba4f06a5f8bdd6d839aabec226227e05298d2d9
|
4
|
+
data.tar.gz: bcda4b9cce83208438b15c247e9f0459073a9025
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6132d887f2f00af3e17eb42c20b8e8f6412ca9a53ae54b3cf2a0393f327d85d550cfef07f68f4d3e8e612880db9da4c002d00f5faa08e0ab87ab61eed7e75d18
|
7
|
+
data.tar.gz: a770beffa97717f64aff5cb9de9bcc597012fdd2a160e22822f68ce914f3702b6d9f19b3d5469bbf117b71bde6e5389a0c69ab3d1fb9cfbb824ce6ebf9c1520a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lazy_records.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: lazy_records 0.0.
|
5
|
+
# stub: lazy_records 0.0.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "lazy_records"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/adapters/sqlite3.rb
CHANGED
data/lib/record.rb
CHANGED
@@ -10,6 +10,17 @@ module LazyRecords
|
|
10
10
|
|
11
11
|
class Record < OpenStruct
|
12
12
|
|
13
|
+
def initialize(hash=nil)
|
14
|
+
@table = {}
|
15
|
+
if hash
|
16
|
+
hash.each_pair do |k, v|
|
17
|
+
k = k.to_s.to_sym
|
18
|
+
@table[k] = v
|
19
|
+
new_ostruct_member(k)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
13
24
|
def get_hash
|
14
25
|
self.instance_variable_get("@table")
|
15
26
|
end
|