Class: Riptables::Chain

Inherits:
Object
  • Object
show all
Defined in:
lib/riptables/chain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, name) ⇒ Chain

Returns a new instance of Chain.



4
5
6
7
8
9
# File 'lib/riptables/chain.rb', line 4

def initialize(table, name)
  @table = table
  @name = name
  @default_action = :accept
  @rules = []
end

Instance Attribute Details

#default_actionObject

Returns the value of attribute default_action.



11
12
13
# File 'lib/riptables/chain.rb', line 11

def default_action
  @default_action
end

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/riptables/chain.rb', line 13

def name
  @name
end

#rulesObject (readonly)

Returns the value of attribute rules.



14
15
16
# File 'lib/riptables/chain.rb', line 14

def rules
  @rules
end

#tableObject (readonly)

Returns the value of attribute table.



12
13
14
# File 'lib/riptables/chain.rb', line 12

def table
  @table
end