Class: ChemistryKit::Config::SplitTesting
- Inherits:
-
Object
- Object
- ChemistryKit::Config::SplitTesting
- Defined in:
- lib/chemistrykit/config/split_testing.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#opt_out ⇒ Object
writeonly
Sets the attribute opt_out.
-
#provider ⇒ Object
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(opts) ⇒ SplitTesting
constructor
A new instance of SplitTesting.
- #opt_out? ⇒ Boolean
Constructor Details
#initialize(opts) ⇒ SplitTesting
Returns a new instance of SplitTesting.
11 12 13 14 15 16 17 18 19 |
# File 'lib/chemistrykit/config/split_testing.rb', line 11 def initialize(opts) opts.each do |key, value| begin send("#{key}=", value) rescue NoMethodError raise ArgumentError.new "The config key: \"#{key}\" is unknown!" end end end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
7 8 9 |
# File 'lib/chemistrykit/config/split_testing.rb', line 7 def base_url @base_url end |
#opt_out=(value) ⇒ Object (writeonly)
Sets the attribute opt_out
9 10 11 |
# File 'lib/chemistrykit/config/split_testing.rb', line 9 def opt_out=(value) @opt_out = value end |
#provider ⇒ Object
Returns the value of attribute provider.
7 8 9 |
# File 'lib/chemistrykit/config/split_testing.rb', line 7 def provider @provider end |
Instance Method Details
#opt_out? ⇒ Boolean
21 22 23 |
# File 'lib/chemistrykit/config/split_testing.rb', line 21 def opt_out? !!@opt_out end |