Class: Validb::Finder
- Inherits:
-
Object
- Object
- Validb::Finder
- Defined in:
- lib/validb/finder.rb
Instance Method Summary collapse
-
#initialize(params, model_name_string) ⇒ Finder
constructor
A new instance of Finder.
- #models ⇒ Object
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
#models ⇒ Object
9 10 11 |
# File 'lib/validb/finder.rb', line 9 def models @model_filterer.filter(selected_models).map(&:name) end |