Class: Advanced::Builders::Scope

Inherits:
Module
  • Object
show all
Defined in:
lib/advanced/builders.rb

Instance Method Summary collapse

Constructor Details

#initialize(search, name) ⇒ Scope

Returns a new instance of Scope.



4
5
6
7
8
# File 'lib/advanced/builders.rb', line 4

def initialize(search, name)
  define_method name do |params = {}|
    search.new(all).call(params)
  end
end