client_data 0.1.1 → 0.1.4

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: b77b38f242c33313c81c3c579bbfe30229161dee
4
- data.tar.gz: dcc8bc8a3e9ad02e03e928243892b4908db83363
3
+ metadata.gz: c245062191f8238376bdfe2b2b72a28d6861d5d6
4
+ data.tar.gz: 8e24ebc0bf1ebe435d1bb06d40d1ff801525c235
5
5
  SHA512:
6
- metadata.gz: 8ce478718d026cc072894ef31dac61c87efad4f34c0b2b6641eae907c6719b2cebb0975c06268511b096c6f0b0953a901c94f0bef554caf5e4f4a9fa6b0a575b
7
- data.tar.gz: 9fcb99d33e6e9991e4905a3d24055e49b49af2270b535478b2ac0473ecb45d36e59e047d911d568cc8683cd3e9412d943b8828dea9366019ebb2dfef97683c38
6
+ metadata.gz: 84f29faffb8b62bf0be5497279d16ed3696a1ca9f2a5688cd40b56afa0d1e50c50e570197fd85f7ca03030feb3206080f8fb2da9320a729caa7500d1f453daaa
7
+ data.tar.gz: 4fe73f3f63267fe96af8bdaa0605389638005005788ec30d723a9952dbc764e872814cb95e85e60d9fae0e6c55fe908b051db4ddd16bf756361c2643dd8c931e
@@ -8,7 +8,17 @@ module ClientData
8
8
 
9
9
  def self.properties(*props)
10
10
  props.each do |m|
11
- define_method(m) { controller.instance_variable_get(:"@#{m}") }
11
+ property(m)
12
+ end
13
+ end
14
+
15
+ def self.property(prop)
16
+ define_method(prop) do
17
+ if controller.respond_to?(prop)
18
+ controller.send(prop)
19
+ else
20
+ controller.instance_variable_get(:"@#{prop}")
21
+ end
12
22
  end
13
23
  end
14
24
  end
@@ -1,3 +1,3 @@
1
1
  module ClientData
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Bondi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport