Class: Rebels::Fakes::FakeDB::NonNullFinder
- Inherits:
-
Struct
- Object
- Struct
- Rebels::Fakes::FakeDB::NonNullFinder
- Defined in:
- lib/rebels/fakes/fake_db.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
Returns the value of attribute attrs.
Instance Method Summary collapse
Instance Attribute Details
#attrs ⇒ Object
Returns the value of attribute attrs
2 3 4 |
# File 'lib/rebels/fakes/fake_db.rb', line 2 def attrs @attrs end |
Instance Method Details
#to_proc ⇒ Object
3 4 5 |
# File 'lib/rebels/fakes/fake_db.rb', line 3 def to_proc ->(thing) { attrs.select{|k,v| !v.nil?}.all?{|k,v| thing.send(k) == v } } end |