Class: ChemistryKit::Config::SplitTesting

Inherits:
Object
  • Object
show all
Defined in:
lib/chemistrykit/config/split_testing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_urlObject

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

Parameters:

  • value

    the value to set the attribute opt_out to.



9
10
11
# File 'lib/chemistrykit/config/split_testing.rb', line 9

def opt_out=(value)
  @opt_out = value
end

#providerObject

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

Returns:

  • (Boolean)


21
22
23
# File 'lib/chemistrykit/config/split_testing.rb', line 21

def opt_out?
  !!@opt_out
end