class Sanction::Whitelist::Node

Public Instance Methods

allow!() click to toggle source
# File lib/sanction/whitelist/node.rb, line 10
def allow!
  false
end
array_class() click to toggle source
# File lib/sanction/whitelist/node.rb, line 37
def array_class
  Sanction::Whitelist::List
end
blacklist?() click to toggle source
# File lib/sanction/whitelist/node.rb, line 29
def blacklist?
  false
end
deny!() click to toggle source
# File lib/sanction/whitelist/node.rb, line 18
def deny!
  @parent.resources << type
  @parent.resources.uniq!
  unlink
  true
end
mode() click to toggle source
# File lib/sanction/whitelist/node.rb, line 33
def mode
  'whitelist'
end
null_array_class() click to toggle source
# File lib/sanction/whitelist/node.rb, line 41
def null_array_class
  Sanction::Whitelist::NullList
end
permitted?() click to toggle source
Calls superclass method Sanction::Node#permitted?
# File lib/sanction/whitelist/node.rb, line 5
def permitted?
  super
  root? ? true : (@parent[type].permitted? && @parent[type].allowed_ids.include?(id))
end
scope() click to toggle source
Calls superclass method Sanction::Node#scope
# File lib/sanction/whitelist/node.rb, line 14
def scope
  permitted? ? super : []
end
whitelist?() click to toggle source
# File lib/sanction/whitelist/node.rb, line 25
def whitelist?
  true
end