Class: WTT::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/wtt.rb

Overview

Holds all config info fopr WTT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration



73
74
75
76
77
78
# File 'lib/wtt.rb', line 73

def initialize
  @traced_port = 0
  @remotes = []
  @reject_filters = []
  @use_default_filters = true
end

Instance Attribute Details

#matcherObject

Returns the value of attribute matcher.



71
72
73
# File 'lib/wtt.rb', line 71

def matcher
  @matcher
end

#reject_filtersObject

Returns the value of attribute reject_filters.



68
69
70
# File 'lib/wtt.rb', line 68

def reject_filters
  @reject_filters
end

#remotesObject

Returns the value of attribute remotes.



70
71
72
# File 'lib/wtt.rb', line 70

def remotes
  @remotes
end

#traced_portObject

Returns the value of attribute traced_port.



67
68
69
# File 'lib/wtt.rb', line 67

def traced_port
  @traced_port
end

#use_default_filtersObject

Returns the value of attribute use_default_filters.



69
70
71
# File 'lib/wtt.rb', line 69

def use_default_filters
  @use_default_filters
end

Instance Method Details

#add_reject_filter(filter) ⇒ Object



80
81
82
# File 'lib/wtt.rb', line 80

def add_reject_filter(filter)
  @reject_filters << filter
end

#add_remote(uri) ⇒ Object



84
85
86
87
# File 'lib/wtt.rb', line 84

def add_remote(uri)
  uri = "druby://#{uri}" unless uri.start_with?('druby://')
  @remotes << uri
end

#default_reject_filtersObject



89
90
91
92
93
# File 'lib/wtt.rb', line 89

def default_reject_filters
  @reject_filters.concat([/_spec.rb$/, # Reject spec files,
                          %r{spec/}, # Reject anything in the spec folder or below
                          %r{/lib/ruby/|/gems/gems/|usr/share/ruby/}]) # Reject any Ruby gem/libraries
end