Class: Validb::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/validb/finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(params, model_name_string) ⇒ Finder

Returns a new instance of Finder.



4
5
6
7
# File 'lib/validb/finder.rb', line 4

def initialize(params, model_name_string)
  @model_filterer = Validb::ModelFilterer.new(params)
  @model_name_string = model_name_string || ""
end

Instance Method Details

#modelsObject



9
10
11
# File 'lib/validb/finder.rb', line 9

def models
  @model_filterer.filter(selected_models).map(&:name)
end