Class: Aoandon::StaticRule
- Inherits:
-
Struct
- Object
- Struct
- Aoandon::StaticRule
- Defined in:
- lib/aoandon/static_rule.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#context ⇒ Object
Returns the value of attribute context.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(*args) ⇒ StaticRule
constructor
A new instance of StaticRule.
Constructor Details
#initialize(*args) ⇒ StaticRule
Returns a new instance of StaticRule.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/aoandon/static_rule.rb', line 3 def initialize(*args) super(*args) self.context['from'] ||= {'addr' => 'any'} self.context['to' ] ||= {'addr' => 'any'} self.context['from'].update('addr' => 'any') unless self.context['from']['addr'] self.context['to' ].update('addr' => 'any') unless self.context['to' ]['addr'] self. ||= {} self..update('log' => false) unless self..has_key?('log') end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
2 3 4 |
# File 'lib/aoandon/static_rule.rb', line 2 def action @action end |
#context ⇒ Object
Returns the value of attribute context
2 3 4 |
# File 'lib/aoandon/static_rule.rb', line 2 def context @context end |
#options ⇒ Object
Returns the value of attribute options
2 3 4 |
# File 'lib/aoandon/static_rule.rb', line 2 def @options end |