Class: OSpecFilter
Class Method Summary collapse
Instance Method Summary collapse
- #===(description) ⇒ Object
- #fails(description) ⇒ Object
-
#initialize ⇒ OSpecFilter
constructor
A new instance of OSpecFilter.
- #register ⇒ Object
- #register_filters(description, block) ⇒ Object
Constructor Details
#initialize ⇒ OSpecFilter
Returns a new instance of OSpecFilter
6 7 8 |
# File 'opal/lib/mspec/opal/runner.rb', line 6 def initialize @filters = Set.new end |
Class Method Details
.main ⇒ Object
2 3 4 |
# File 'opal/lib/mspec/opal/runner.rb', line 2 def self.main @main ||= self.new end |
Instance Method Details
#===(description) ⇒ Object
14 15 16 |
# File 'opal/lib/mspec/opal/runner.rb', line 14 def ===(description) @filters.include? description end |
#fails(description) ⇒ Object
22 23 24 |
# File 'opal/lib/mspec/opal/runner.rb', line 22 def fails(description) @filters << description end |
#register ⇒ Object
10 11 12 |
# File 'opal/lib/mspec/opal/runner.rb', line 10 def register MSpec.register :exclude, self end |
#register_filters(description, block) ⇒ Object
18 19 20 |
# File 'opal/lib/mspec/opal/runner.rb', line 18 def register_filters(description, block) instance_eval(&block) end |