Class: SimpleCov::Profiles
- Inherits:
-
Hash
- Object
- Hash
- SimpleCov::Profiles
- Defined in:
- lib/simplecov/profiles.rb
Instance Method Summary collapse
-
#define(name, &blk) ⇒ Object
Define a SimpleCov profile: SimpleCov.profiles.define ‘rails’ do # Same as SimpleCov.configure do ..
-
#load(name) ⇒ Object
Applies the profile of given name on SimpleCov.configure.
Instance Method Details
#define(name, &blk) ⇒ Object
Define a SimpleCov profile:
SimpleCov.profiles.define 'rails' do
# Same as SimpleCov.configure do .. here
end
18 19 20 21 22 |
# File 'lib/simplecov/profiles.rb', line 18 def define(name, &blk) name = name.to_sym raise "SimpleCov Profile '#{name}' is already defined" unless self[name].nil? self[name] = blk end |
#load(name) ⇒ Object
Applies the profile of given name on SimpleCov.configure
27 28 29 30 31 |
# File 'lib/simplecov/profiles.rb', line 27 def load(name) name = name.to_sym raise "Could not find SimpleCov Profile called '#{name}'" unless key?(name) SimpleCov.configure(&self[name]) end |