evt-reflect 0.1.0.0 → 0.1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/reflect/reflection.rb +7 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9d1cbec147b0821067b19f44ed87f9a775dae5fdbdddb7c0aec6ad1075cd38
4
- data.tar.gz: ef299e3d6a8a6ff804843ec2b7903429472c1a9dba1c58b4dca11ccbb5d6ea18
3
+ metadata.gz: 2cb7354176aa20ae6ac1b80dac6373d786aaf3e38934093fdbc732f844af0e8e
4
+ data.tar.gz: 6fec96989b2f5d08ba6115c4db77379aec0b019d77f53d4c9e0296de90a4d872
5
5
  SHA512:
6
- metadata.gz: 98f99e913466aadd2bac00430a7f9882a7ef6a17c08e235d3d1f32b07c493b488a75f6c601cc847bb671a96747b94ded17f3d1a6f519c370776cf57deefad5aa
7
- data.tar.gz: 6c5ac0da38a42f352e9cd78d003ed5d66d7a447bf8ed4daee3dc5625090f8c5c6e63b6a1a5e982ba4065e53367cb8f3971b2fa92ff3d7d74778f98ebd89618ad
6
+ metadata.gz: c31835237d4b0d55ba9ef9bc2fb102dad19990814e94ed8ea0b4f38865e75a8850137120389bc376ab029a537172fce4b003a175ffd686a68c087fc6f5da167e
7
+ data.tar.gz: cb26d37deea43d8761f81beb5ac5a8e088f59a978d8d68de17a3023f7f7d1458e309ca14f15e2b4484921e346ca302326e922890558503937e0e4e9c49145dc3
@@ -39,15 +39,19 @@ module Reflect
39
39
  constant.respond_to?(name)
40
40
  end
41
41
 
42
- def get(accessor_name)
43
- result = get_constant(accessor_name)
42
+ def get(accessor_name, strict: nil)
43
+ strict = self.strict if strict.nil?
44
+
45
+ result = get_constant(accessor_name, strict: strict)
44
46
  return nil if result.nil?
45
47
 
46
48
  constant = Reflect.subject_constant(result)
47
49
  self.class.new(subject, constant, strict)
48
50
  end
49
51
 
50
- def get_constant(accessor_name)
52
+ def get_constant(accessor_name, strict: nil)
53
+ strict = self.strict if strict.nil?
54
+
51
55
  if !constant_accessor?(accessor_name)
52
56
  if strict
53
57
  raise Reflect::Error, "Constant #{constant.name} does not have accessor #{accessor_name}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-reflect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.0
4
+ version: 0.1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_bench