Class: Riptables::DSL::Rule

Inherits:
Global
  • Object
show all
Defined in:
lib/riptables/dsl/rule.rb

Instance Method Summary collapse

Methods inherited from Global

#role, #zone

Constructor Details

#initialize(rule) ⇒ Rule

Returns a new instance of Rule.



8
9
10
# File 'lib/riptables/dsl/rule.rb', line 8

def initialize(rule)
  @rule = rule
end

Instance Method Details

#action(action) ⇒ Object



16
17
18
# File 'lib/riptables/dsl/rule.rb', line 16

def action(action)
  @rule.action = action
end

#permutation(description, options = {}) ⇒ Object



20
21
22
# File 'lib/riptables/dsl/rule.rb', line 20

def permutation(description, options = {})
  @rule.permutations << RulePermutation.new(@rule, description, options)
end

#rule(rule) ⇒ Object



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

def rule(rule)
  @rule.rule = rule
end

#version(number) ⇒ Object



24
25
26
# File 'lib/riptables/dsl/rule.rb', line 24

def version(number)
  @rule.versions = [number]
end