Class: Validb::ModelFilterer

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

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ ModelFilterer

Returns a new instance of ModelFilterer.



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

def initialize(params)
  @params = params
end

Instance Method Details

#filter(models) ⇒ Object



8
9
10
11
12
13
# File 'lib/validb/model_filterer.rb', line 8

def filter(models)
  filtered_models = validatable_models(models)
  filtered_models = non_ignored_models(filtered_models)
  filtered_models = non_ignored_prefix_models(filtered_models)
  non_inherited_models(filtered_models).sort_by(&:name)
end