supports_pointer 0.5.0 → 0.5.2

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
  SHA256:
3
- metadata.gz: 3e4e9bf143c824bb44ee0d6118ce2b19e931250728e6e7c656297f4cc651e304
4
- data.tar.gz: 6604b4d85a25ce1b2467c85f7bf797a6ecb84d59c4cb06a9b7848893dc458c6a
3
+ metadata.gz: 87a065ab05683ee49c256c0c8e40fd7941cdbd62ff3002e081b5079084da3f85
4
+ data.tar.gz: b56a1afdc0bbf48c93a38740be725948cc2f2993c59c22795dbbcb059f1719ee
5
5
  SHA512:
6
- metadata.gz: 90bf68d4e41547e0dcf6a6fd92fa5cfbb28b2853e8a8efb1f88d91dc86cf4a7267d1510ac839b7af701fcdfff441c045a9e051cbc0fe1f470f35882b9045da6c
7
- data.tar.gz: bfceb10d6c0234f3faa1cc2116d834e59f2567fccf938c10ec6d4a13da6360ee5bd845af63ced96166dc76ef6c041e7bbcf6d365e371350421e91db58c8cbf2f
6
+ metadata.gz: 193750b10c644a80c2270d370c87f9fa7cdacec60b42ed64d2bbc8c3346c38483539115885f53931f934eab744d650e033752e93cfdac376bfda2f3518c77112
7
+ data.tar.gz: '049f9f2140fab34d22b4d92986768f89bdf015909ab6a77cf69ac68ef93d79da1dea0ac6a1f44598e7dccfd6478de92c6d5f9cd0cc0a92f6c7dd807a4f6352f5'
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:
@@ -50,7 +50,7 @@ This will allow the Widget class to access the handle pointer.
50
50
 
51
51
  A pointer can be parsed by calling ```parse_pointer``` on any model or object
52
52
  which supports the pointer type in question. In situations where a string matches
53
- the regexp of multiple pointer types, you can specify the pointer_type used for parsing with ```parse_{handle_name}_pointer``` such as ```parse_model_pointer``` or ```parse_model_instance_pointer```.
53
+ the regexp of multiple pointer types, you can specify the pointer_type used for parsing with ```parse_{pointer_type_name}_pointer``` such as ```parse_model_pointer``` or ```parse_model_instance_pointer```.
54
54
 
55
55
  When declaring model & model instance pointers, it may be helpful to declare a ```to_pointer``` method, returning ```generate_model_pointer``` and ```generate_model_instance_pointer```
56
56
  respectively:
@@ -1,3 +1,3 @@
1
1
  module SupportsPointer
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supports_pointer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Mikeska
@@ -55,6 +55,7 @@ licenses:
55
55
  metadata:
56
56
  homepage_uri: https://github.com/gmikeska/supports_pointer
57
57
  source_code_uri: https://github.com/gmikeska/supports_pointer
58
+ documentation_uri: https://www.rubydoc.info/gems/supports_pointer
58
59
  changelog_uri: https://github.com/gmikeska/supports_pointer/blob/master/CHANGELOG.MD
59
60
  post_install_message:
60
61
  rdoc_options: []