Class: OnetableTerminator::Structures::Nic
- Inherits:
-
Object
- Object
- OnetableTerminator::Structures::Nic
- Defined in:
- lib/onetable_terminator/structures/nic.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #add_rule(rule) ⇒ Object
-
#initialize(name) ⇒ Nic
constructor
A new instance of Nic.
Constructor Details
#initialize(name) ⇒ Nic
Returns a new instance of Nic.
6 7 8 9 |
# File 'lib/onetable_terminator/structures/nic.rb', line 6 def initialize(name) @name = name @rules = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/onetable_terminator/structures/nic.rb', line 4 def name @name end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
4 5 6 |
# File 'lib/onetable_terminator/structures/nic.rb', line 4 def rules @rules end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 |
# File 'lib/onetable_terminator/structures/nic.rb', line 15 def ==(other) name == other.name && rules == other.rules end |
#add_rule(rule) ⇒ Object
11 12 13 |
# File 'lib/onetable_terminator/structures/nic.rb', line 11 def add_rule(rule) rules << rule end |