Class: SourceRoute::Wrapper::Condition
- Inherits:
-
Struct
- Object
- Struct
- SourceRoute::Wrapper::Condition
- Defined in:
- lib/source_route/wrapper.rb,
lib/source_route/wrapper.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#negatives ⇒ Object
Returns the value of attribute negatives.
-
#positive ⇒ Object
Returns the value of attribute positive.
-
#result_config ⇒ Object
Returns the value of attribute result_config.
Instance Method Summary collapse
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events
10 11 12 |
# File 'lib/source_route/wrapper.rb', line 10 def events @events end |
#negatives ⇒ Object
Returns the value of attribute negatives
10 11 12 |
# File 'lib/source_route/wrapper.rb', line 10 def negatives @negatives end |
#positive ⇒ Object
Returns the value of attribute positive
10 11 12 |
# File 'lib/source_route/wrapper.rb', line 10 def positive @positive end |
#result_config ⇒ Object
Returns the value of attribute result_config
10 11 12 |
# File 'lib/source_route/wrapper.rb', line 10 def result_config @result_config end |
Instance Method Details
#event(*v) ⇒ Object
24 25 26 27 |
# File 'lib/source_route/wrapper.rb', line 24 def event(*v) # why need self? without self, the events will not really changed, why?. seems a bug in Struct self.events = v.map(&:to_sym) unless v == [] end |
#output_format(data = nil, &block) ⇒ Object
29 30 31 |
# File 'lib/source_route/wrapper.rb', line 29 def output_format(data = nil, &block) result_config.format = block_given? ? block : data end |