Module: Monolith::Finder
- Included in:
- BranchFinder, RepositoryFinder
- Defined in:
- lib/monolith/finder.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/monolith/finder.rb', line 3 def self.included(mod) mod.class_eval do extend Forwardable include Enumerable def_delegators :all, :each, :size end end |
Instance Method Details
#find_by_name(name) ⇒ Object
12 13 14 15 16 |
# File 'lib/monolith/finder.rb', line 12 def find_by_name(name) detect do |findable| findable.name == name end end |