Class: Repositories::BranchNamesFinder
- Inherits:
-
Object
- Object
- Repositories::BranchNamesFinder
- Defined in:
- app/finders/repositories/branch_names_finder.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(repository, params = {}) ⇒ BranchNamesFinder
constructor
A new instance of BranchNamesFinder.
Constructor Details
#initialize(repository, params = {}) ⇒ BranchNamesFinder
Returns a new instance of BranchNamesFinder.
7 8 9 10 |
# File 'app/finders/repositories/branch_names_finder.rb', line 7 def initialize(repository, params = {}) @repository = repository @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/finders/repositories/branch_names_finder.rb', line 5 def params @params end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
5 6 7 |
# File 'app/finders/repositories/branch_names_finder.rb', line 5 def repository @repository end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 |
# File 'app/finders/repositories/branch_names_finder.rb', line 12 def execute return unless search && offset && limit repository.search_branch_names(search).lazy.drop(offset).take(limit) # rubocop:disable CodeReuse/ActiveRecord end |