lazy_record 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bc0937314b609cac19dbd32b7a69d5833d23b1a
4
- data.tar.gz: 11941dc0a6c8b0f3c15b1875606637752641ff2a
3
+ metadata.gz: 2c230f7e027c8258f3252edb747c7287ad6e3328
4
+ data.tar.gz: 7c79ccae1ec72aa41c7eb33a19092186e07b081d
5
5
  SHA512:
6
- metadata.gz: 48345672368d7f8e32c8d216e55b78ba1a4bf2f1f29a32ac958484bea3b074bc0f66ec1d905799afbda616c185daa72611666d337fd33fc49fb09ec4e3232765
7
- data.tar.gz: 12e8cce3cd65a4ae3341dbe5e7bcd1e259f38f6e878f9c525605433e7abb50ed53865b62772ed83b7beac3eeef7b1b2cf6f40833b2f7a5aa2a29662532077146
6
+ metadata.gz: 58bebeffd2050ecde571b12fbd761271f3dd1ca7c86abde51e3aa0ed68f3d6c5f797eb4a212d832f71faa46b460402eb0e2d2f61f0f75305e8c173765c656eba
7
+ data.tar.gz: 61ef6f43c5db74633417eb8cf3ad239e7ac2bee3d5d2dde3f75758c5313698e525ce33361c8ea3dbdc5444731ec10a57e28a0312d59c4120bfc8f010f8514b6b
@@ -26,7 +26,7 @@ module LazyRecord
26
26
  end
27
27
 
28
28
  def apply_nesting(class_name)
29
- "#{self.to_s.split('::')[0..-3].join('::')}::#{class_name}"
29
+ "#{to_s.split('::')[0..-3].join('::')}::#{class_name}"
30
30
  end
31
31
 
32
32
  def lr_has_many(*collections)
@@ -21,6 +21,11 @@ module LazyRecord
21
21
 
22
22
  def define_initialize
23
23
  define_method(:initialize) do |opts = {}, &block|
24
+ opts = opts.inject({}) do |memo, (k,v)|
25
+ memo[k.to_sym] = v
26
+ memo
27
+ end
28
+
24
29
  instance_attr_accessors.each do |attr|
25
30
  send("#{attr}=", opts[attr.to_sym])
26
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LazyRecord
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazy_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Simon Borg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-04 00:00:00.000000000 Z
11
+ date: 2017-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport