class Sanction::Blacklist::NullNode

Public Instance Methods

allow!() click to toggle source
# File lib/sanction/blacklist/null_node.rb, line 11
def allow!
  false
end
array_class() click to toggle source
# File lib/sanction/blacklist/null_node.rb, line 30
def array_class
  Sanction::Blacklist::NullList
end
Also aliased as: null_array_class
deny!() click to toggle source
# File lib/sanction/blacklist/null_node.rb, line 15
def deny!
  ancestors.reject(&:persisted?).each(&:deny!)
  @parent = root.find(@parent.type, @parent.id) unless @parent.persisted?
  @parent.resources << type
  @parent.resources.uniq!
  @parent.add_subject({
    id:   id,
    type: type
  })
end
null_array_class()
Alias for: array_class
permitted?() click to toggle source
# File lib/sanction/blacklist/null_node.rb, line 5
def permitted?
  a = ancestors.reject(&:root?).map(&:permitted?)
  a << true 
  a.all?
end
persisted?() click to toggle source
# File lib/sanction/blacklist/null_node.rb, line 26
def persisted?
  false
end