Class: Riptables::DSL::Global

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

Direct Known Subclasses

Base, Rule, Table

Instance Method Summary collapse

Instance Method Details

#role(*roles, &block) ⇒ Object

Any rules which are defined while inside this block should only apply to the associated roles.



22
23
24
25
26
# File 'lib/riptables/dsl/global.rb', line 22

def role(*roles, &block)
  RoleCondition.new(roles) do
    block.call
  end
end

#zone(*zones, &block) ⇒ Object

Any rules which are defined while inside this block should only apply to the associated zones.



12
13
14
15
16
# File 'lib/riptables/dsl/global.rb', line 12

def zone(*zones, &block)
  ZoneCondition.new(zones) do
    block.call
  end
end