Class: TappingDevice::Configuration

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

Constant Summary collapse

DEFAULTS =
{
  filter_by_paths: [],
  exclude_by_paths: [],
  with_trace_to: 50,
  event_type: :return,
  hijack_attr_methods: false,
  track_as_records: false,
  ignore_private: false,
  only_private: false
}.merge(TappingDevice::Output::DEFAULT_OPTIONS)

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
# File 'lib/tapping_device/configuration.rb', line 14

def initialize
  @options = {}

  DEFAULTS.each do |key, value|
    @options[key] = value
  end
end

Instance Method Details

#[](key) ⇒ Object



22
23
24
# File 'lib/tapping_device/configuration.rb', line 22

def [](key)
  @options[key]
end

#[]=(key, value) ⇒ Object



26
27
28
# File 'lib/tapping_device/configuration.rb', line 26

def []=(key, value)
  @options[key] = value
end