Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantiation of search adapter instead of usage self-methods of adapter #13

Open
Tab10id opened this issue Mar 2, 2017 · 0 comments
Open

Comments

@Tab10id
Copy link
Collaborator

Tab10id commented Mar 2, 2017

When we use options for some filtration purposes we have to transfer them through all self-methods.
Instead of this we can use something like this in adapters:

class MySearchAdapter
  def initialize(options)
    @options = options
  end

  def search(term, page)
    # some logic with @options
  end

  private

  # ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant