Class: ConfCtl::Cli::AttrFilters

Inherits:
Object
  • Object
show all
Defined in:
lib/confctl/cli/attr_filters.rb

Instance Method Summary collapse

Constructor Details

#initialize(str_filters) ⇒ AttrFilters

Returns a new instance of AttrFilters.

Parameters:

  • str_filters (Array<String>)


4
5
6
# File 'lib/confctl/cli/attr_filters.rb', line 4

def initialize(str_filters)
  @filters = parse_all(str_filters)
end

Instance Method Details

#pass?(machine) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


9
10
11
# File 'lib/confctl/cli/attr_filters.rb', line 9

def pass?(machine)
  filters.all? { |f| f.call(machine) }
end