Module: Sanction

Extended by:
Sanction
Included in:
Sanction
Defined in:
lib/sanction.rb,
lib/sanction/node.rb,
lib/sanction/tree.rb,
lib/sanction/version.rb,
lib/sanction/permission.rb,
lib/sanction/attached_list.rb,
lib/sanction/blacklist/list.rb,
lib/sanction/blacklist/node.rb,
lib/sanction/whitelist/list.rb,
lib/sanction/whitelist/node.rb,
lib/sanction/blacklist/null_list.rb,
lib/sanction/blacklist/null_node.rb,
lib/sanction/whitelist/null_list.rb,
lib/sanction/whitelist/null_node.rb

Defined Under Namespace

Modules: Blacklist, Tree, Whitelist Classes: AttachedList, Node, Permission

Constant Summary collapse

VERSION =
"2.1.3"

Instance Method Summary collapse

Instance Method Details

#build(hash) ⇒ Object



28
29
30
# File 'lib/sanction.rb', line 28

def build(hash)
  "sanction/#{hash[:mode]}/node".classify.constantize.new(hash)
end

#permission(permission, *predicates) ⇒ Object



32
33
34
# File 'lib/sanction.rb', line 32

def permission(permission, *predicates)
  Sanction::Permission.new(permission, *predicates)
end