Class: FeatureGuard
- Defined in:
- lib/extensions/mspec/mspec/guards/feature.rb
Instance Attribute Summary
Attributes inherited from SpecGuard
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SpecGuard
#===, #add, clear, clear_guards, finish, guards, #implementation?, #initialize, #os?, #platform?, #record, report, #report_key, #reporting?, ruby_version, ruby_version_override, ruby_version_override=, #standard?, #unregister, #windows?, #wordsize?, #yield?
Constructor Details
This class inherits a constructor from SpecGuard
Class Method Details
.enabled?(*features) ⇒ Boolean
4 5 6 |
# File 'lib/extensions/mspec/mspec/guards/feature.rb', line 4 def self.enabled?(*features) new(*features).match? end |
Instance Method Details
#match? ⇒ Boolean
8 9 10 |
# File 'lib/extensions/mspec/mspec/guards/feature.rb', line 8 def match? @parameters.all? { |f| MSpec.feature_enabled? f } end |