supports_pointer 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/supports_pointer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 683bac4d43d854b62c2193bea25d8824612f83784673b852be0a525b549309fb
|
4
|
+
data.tar.gz: a010b5abbc5673d5fe991b0c20cd92d00be15ee4ca5a913e79076a54b5427e9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32ad84863b0a9f65035dc224804c1217254b40a7e657a377989fd194f4b6e3e01d10648234fcba3c2bb7a1efe1d493e19667b7081637e78cf36f78bfe1a2b2f5
|
7
|
+
data.tar.gz: 19362dc21bf55037a898028394d1d6764778ea099ce2c17959879bd80729cd9d7f5f661fe26a851ceb7702dad5d1daf557cef9b757c04817bb498bc1a39ecdf3
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Add the following to your model:
|
|
6
6
|
```ruby
|
7
7
|
parses_pointer :pointer_name_as_symbol,
|
8
8
|
template:/regexp(?<with_captures>.*)for(?<each_field>)/,
|
9
|
-
resolve:{|data| data[:with_captures].find_by(some_param:data[:other_capture]),
|
10
|
-
generate:{|target| "#{target.some_attr}:#{target.other_attr}"}
|
9
|
+
resolve:Proc.new{|data| data[:with_captures].find_by(some_param:data[:other_capture]),
|
10
|
+
generate:Proc.new{|target| "#{target.some_attr}:#{target.other_attr}"}
|
11
11
|
```
|
12
12
|
|
13
13
|
if the pointer being declared is a model pointer, or model_instance pointer, simply declare:
|