falcor 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/falcor/define_dsl.rb +4 -4
- data/lib/falcor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c0bd69c0c800adcc97279a541dafedd65aa2f9
|
4
|
+
data.tar.gz: f4b8a69342631e436e5ea1e06128bf145b8d7a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52d190805a5e90bd1462832718b973e642792079c2ae655f8282e34c41a89d897127c4940fd47e3c1817cc1e7cb88b834a616adb8dad0823e5cc5bb8ce6e3053
|
7
|
+
data.tar.gz: 32423d87de61f55480649be41673b8965d33871739357c5d748b8d58bf25c8fef9793e7e1716840ea9e6da6e440321509ae699796bd2513bdefdf392de0cf29b
|
data/lib/falcor/define_dsl.rb
CHANGED
@@ -10,7 +10,7 @@ module Falcor
|
|
10
10
|
def allow(attr)
|
11
11
|
self.fields = (self.fields || []).push(attr)
|
12
12
|
|
13
|
-
default_blk = Proc.new {
|
13
|
+
default_blk = Proc.new { self.instance_variable_get("@#{attr}".to_sym) }
|
14
14
|
self.send(:define_method, attr, default_blk)
|
15
15
|
|
16
16
|
default_assignment_blk = Proc.new do |val|
|
@@ -23,7 +23,7 @@ module Falcor
|
|
23
23
|
def field(attr, default)
|
24
24
|
self.fields = (self.fields || []).push(attr)
|
25
25
|
|
26
|
-
default_blk = Proc.new {
|
26
|
+
default_blk = Proc.new { self.instance_variable_get("@#{attr}".to_sym) || default }
|
27
27
|
self.send(:define_method, attr, default_blk)
|
28
28
|
|
29
29
|
default_assignment_blk = Proc.new do |val|
|
@@ -40,7 +40,7 @@ module Falcor
|
|
40
40
|
model = Factory attr
|
41
41
|
end
|
42
42
|
|
43
|
-
default_blk = Proc.new {
|
43
|
+
default_blk = Proc.new { self.instance_variable_get("@#{attr}".to_sym) || model }
|
44
44
|
self.send(:define_method, attr, default_blk)
|
45
45
|
|
46
46
|
default_assignment_blk = Proc.new do |val|
|
@@ -64,7 +64,7 @@ module Falcor
|
|
64
64
|
models << model
|
65
65
|
end
|
66
66
|
|
67
|
-
default_blk = Proc.new {
|
67
|
+
default_blk = Proc.new { self.instance_variable_get("@#{attr}".to_sym) || models }
|
68
68
|
self.send(:define_method, attr, default_blk)
|
69
69
|
|
70
70
|
default_assignment_blk = Proc.new do |val|
|
data/lib/falcor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Gauger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.1.11
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Quickly build example data
|