Class: Scientist::Default

Inherits:
Object
  • Object
show all
Includes:
Experiment
Defined in:
lib/scientist/default.rb

Overview

A null experiment.

Instance Attribute Summary collapse

Attributes included from Experiment

#raise_on_mismatches

Instance Method Summary collapse

Methods included from Experiment

#before_run, #behaviors, #clean, #clean_value, #cleaner, #compare, #context, #fabricate_durations_for_testing_purposes, #generate_result, #ignore, #ignore_mismatched_observation?, included, new, #observations_are_equivalent?, #raise_on_mismatches?, #raise_with, #raised, #run, #run_if, #run_if_block_allows?, set_default, #should_experiment_run?, #try, #use

Constructor Details

#initialize(name) ⇒ Default

Returns a new instance of Default.



9
10
11
# File 'lib/scientist/default.rb', line 9

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/scientist/default.rb', line 7

def name
  @name
end

Instance Method Details

#enabled?Boolean

Don’t run experiments.

Returns:

  • (Boolean)


14
15
16
# File 'lib/scientist/default.rb', line 14

def enabled?
  false
end

#publish(result) ⇒ Object

Don’t publish anything.



19
20
# File 'lib/scientist/default.rb', line 19

def publish(result)
end