Class: WTT::Configuration
- Inherits:
-
Object
- Object
- WTT::Configuration
- Defined in:
- lib/wtt.rb
Overview
Holds all config info fopr WTT
Instance Attribute Summary collapse
-
#matcher ⇒ Object
Returns the value of attribute matcher.
-
#reject_filters ⇒ Object
Returns the value of attribute reject_filters.
-
#remotes ⇒ Object
Returns the value of attribute remotes.
-
#traced_port ⇒ Object
Returns the value of attribute traced_port.
-
#use_default_filters ⇒ Object
Returns the value of attribute use_default_filters.
Instance Method Summary collapse
- #add_reject_filter(filter) ⇒ Object
- #add_remote(uri) ⇒ Object
- #default_reject_filters ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#matcher ⇒ Object
Returns the value of attribute matcher.
71 72 73 |
# File 'lib/wtt.rb', line 71 def matcher @matcher end |
#reject_filters ⇒ Object
Returns the value of attribute reject_filters.
68 69 70 |
# File 'lib/wtt.rb', line 68 def reject_filters @reject_filters end |
#remotes ⇒ Object
Returns the value of attribute remotes.
70 71 72 |
# File 'lib/wtt.rb', line 70 def remotes @remotes end |
#traced_port ⇒ Object
Returns the value of attribute traced_port.
67 68 69 |
# File 'lib/wtt.rb', line 67 def traced_port @traced_port end |
#use_default_filters ⇒ Object
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_filters ⇒ Object
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 |