class SourceRoute::Config
todo: Here is not good. Tried to compatible with different options but code becomes hard to maintenance
Constants
- DIRECT_ATTRS
Attributes
negatives[RW]
positives[RW]
Public Class Methods
new()
click to toggle source
# File lib/source_route/config.rb, line 18 def initialize @event = [:call] @output_format = :test @positives = {} @negatives = {} end
Public Instance Methods
event_becomes_array()
click to toggle source
# File lib/source_route/config.rb, line 36 def event_becomes_array self.event = Array(event).map(&:to_sym) end
formulize()
click to toggle source
mutable method
# File lib/source_route/config.rb, line 26 def formulize symbolize_output_format event_becomes_array self end
has_call_and_return_event()
click to toggle source
# File lib/source_route/config.rb, line 40 def has_call_and_return_event event.include? :return and event.include? :call end
symbolize_output_format()
click to toggle source
# File lib/source_route/config.rb, line 32 def symbolize_output_format self.output_format = output_format.to_sym if output_format.respond_to? :to_sym end