Module: Sprinkle::Core

Included in:
Object
Defined in:
lib/sprinkle/core.rb

Instance Method Summary collapse

Instance Method Details

#policy(name, options = {}, &block) ⇒ Object

Defines a single policy. Currently the only option, which is also required, is :roles, which defines which servers a policy is used on.


9
10
11
12
13
# File 'lib/sprinkle/core.rb', line 9

def policy(name, options = {}, &block)
  p = Sprinkle::Policy.new(name, options, &block)
  POLICIES << p
  p
end