Class: ConfCtl::Cli::AttrFilters
- Inherits:
-
Object
- Object
- ConfCtl::Cli::AttrFilters
- Defined in:
- lib/confctl/cli/attr_filters.rb
Instance Method Summary collapse
-
#initialize(str_filters) ⇒ AttrFilters
constructor
A new instance of AttrFilters.
- #pass?(machine) ⇒ Boolean
Constructor Details
#initialize(str_filters) ⇒ AttrFilters
Returns a new instance of AttrFilters.
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
9 10 11 |
# File 'lib/confctl/cli/attr_filters.rb', line 9 def pass?(machine) filters.all? { |f| f.call(machine) } end |