Class: DefaultVariableParser

Inherits:
VariableParser show all
Defined in:
lib/default_variable_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#logObject

Returns the value of attribute log.



6
7
8
# File 'lib/default_variable_parser.rb', line 6

def log
  @log
end

#readerObject

Returns the value of attribute reader.



6
7
8
# File 'lib/default_variable_parser.rb', line 6

def reader
  @reader
end

Instance Method Details

#parse(context, experiment_name, variant_name, config) ⇒ Object



8
9
10
11
12
# File 'lib/default_variable_parser.rb', line 8

def parse(context, experiment_name, variant_name, config)
  JSON.parse(config, symbolize_names: true)
rescue JSON::ParserError
  nil
end