Class: Comply::WhitelistConstantize::MatcherFactory
- Inherits:
-
Object
- Object
- Comply::WhitelistConstantize::MatcherFactory
- Defined in:
- lib/comply/whitelist_constantize.rb
Instance Attribute Summary collapse
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(obj, options = {}) ⇒ MatcherFactory
constructor
A new instance of MatcherFactory.
- #to_matcher ⇒ Object
Constructor Details
#initialize(obj, options = {}) ⇒ MatcherFactory
Returns a new instance of MatcherFactory.
8 9 10 11 |
# File 'lib/comply/whitelist_constantize.rb', line 8 def initialize(obj, = {}) @obj = obj @options = end |
Instance Attribute Details
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
7 8 9 |
# File 'lib/comply/whitelist_constantize.rb', line 7 def obj @obj end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/comply/whitelist_constantize.rb', line 7 def @options end |
Instance Method Details
#to_matcher ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/comply/whitelist_constantize.rb', line 13 def to_matcher if obj.is_a?(Module) && [:include_inheritance] procify_module else obj end end |