Class: SourceRoute::Config
Constant Summary collapse
- DIRECT_ATTRS =
[:event, :full_feature, :debug, :output_format, :show_additional_attrs, :filename, :include_local_var, :include_instance_var, :import_return_to_call ]
Instance Attribute Summary collapse
-
#negatives ⇒ Object
Returns the value of attribute negatives.
-
#positives ⇒ Object
Returns the value of attribute positives.
Instance Method Summary collapse
- #event_becomes_array ⇒ Object
-
#formulize ⇒ Object
mutable method.
- #has_call_and_return_event ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #symbolize_output_format ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 |
# File 'lib/source_route/config.rb', line 16 def initialize @event = [:call] @output_format = :test @positives = {} @negatives = {} end |
Instance Attribute Details
#negatives ⇒ Object
Returns the value of attribute negatives.
14 15 16 |
# File 'lib/source_route/config.rb', line 14 def negatives @negatives end |
#positives ⇒ Object
Returns the value of attribute positives.
14 15 16 |
# File 'lib/source_route/config.rb', line 14 def positives @positives end |
Instance Method Details
#event_becomes_array ⇒ Object
34 35 36 |
# File 'lib/source_route/config.rb', line 34 def event_becomes_array self.event = Array(event).map(&:to_sym) end |
#formulize ⇒ Object
mutable method
24 25 26 27 28 |
# File 'lib/source_route/config.rb', line 24 def formulize symbolize_output_format event_becomes_array self end |
#has_call_and_return_event ⇒ Object
38 39 40 |
# File 'lib/source_route/config.rb', line 38 def has_call_and_return_event event.include? :return and event.include? :call end |
#symbolize_output_format ⇒ Object
30 31 32 |
# File 'lib/source_route/config.rb', line 30 def symbolize_output_format self.output_format = output_format.to_sym if output_format.respond_to? :to_sym end |