module SourceRoute::ParamsConfigParser

Public Instance Methods

full_feature(value=true) click to toggle source

todo. value equal 10 may not be a good params

# File lib/source_route/config.rb, line 119
def full_feature(value=true)
  return unless value
  @config.formulize
  @config.event = (@config.event + [:call, :return]).uniq
  @config.import_return_to_call = true
  @config.show_additional_attrs = [:path, :lineno]
  # JSON serialize trigger many problems when handle complicated object(in rails?)
  # a Back Door to open more data. but be care it could trigger weird crash when Jsonify these vars
  if value == 10
    @config.include_instance_var = true
    @config.include_local_var = true
  end
end
run(params) click to toggle source
# File lib/source_route/config.rb, line 109
def run(params)
  @config = Config.new
  params.each do |k, v|
    @config.send("#{k}=", v) if Config::DIRECT_ATTRS.include? k.to_sym
    send(k, v) if (TRACE_FILTER_METHODS + [:full_feature]).include? k.to_sym
  end
  @config.formulize
end