Class: ViewSpec::EntryCollection
- Inherits:
-
Object
- Object
- ViewSpec::EntryCollection
- Includes:
- Collection
- Defined in:
- lib/view_spec/entry_collection.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods included from Collection
#+, #<<, #find_where, #find_where!, #initialize, #to_a, #where
Instance Method Details
#find(name = nil, &block) ⇒ Object
5 6 7 8 9 |
# File 'lib/view_spec/entry_collection.rb', line 5 def find(name = nil, &block) return items.find(&block) if name.nil? find_where({name: name.to_s}) || find_where({subject: name}) end |