Class: TypeTracer::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/type_tracer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



14
15
16
# File 'lib/type_tracer/config.rb', line 14

def initialize
  @type_sampler_root_path = Dir.pwd
end

Instance Attribute Details

#attribute_methods_definerObject

Returns the value of attribute attribute_methods_definer.



8
9
10
# File 'lib/type_tracer/config.rb', line 8

def attribute_methods_definer
  @attribute_methods_definer
end

#git_commitObject

Returns the value of attribute git_commit.



8
9
10
# File 'lib/type_tracer/config.rb', line 8

def git_commit
  @git_commit
end

#rack_type_sample_deciderObject (readonly)

Set this by giving a block to sample_types_for_requests



12
13
14
# File 'lib/type_tracer/config.rb', line 12

def rack_type_sample_decider
  @rack_type_sample_decider
end

#sampled_types_urlObject

Returns the value of attribute sampled_types_url.



8
9
10
# File 'lib/type_tracer/config.rb', line 8

def sampled_types_url
  @sampled_types_url
end

#type_check_path_regexObject

Returns the value of attribute type_check_path_regex.



8
9
10
# File 'lib/type_tracer/config.rb', line 8

def type_check_path_regex
  @type_check_path_regex
end

#type_check_root_pathObject

Returns the value of attribute type_check_root_path.



8
9
10
# File 'lib/type_tracer/config.rb', line 8

def type_check_root_path
  @type_check_root_path
end

Instance Method Details

#sample_types_for_requests(&block) ⇒ Object



18
19
20
# File 'lib/type_tracer/config.rb', line 18

def sample_types_for_requests(&block)
  @rack_type_sample_decider = block.to_proc
end