Class: Sanction::Blacklist::NullList

Inherits:
List show all
Defined in:
lib/sanction/blacklist/null_list.rb

Instance Attribute Summary

Attributes inherited from AttachedList

#key, #parent

Instance Method Summary collapse

Methods inherited from List

#allowed_ids, #blacklist?, #denied_ids, #whitelist?

Methods inherited from AttachedList

#[], #allowed_ids, #denied_ids, #has_scope?, #ids_blank?, #initialize, #resources, #type, #wildcard_member, #wildcard_resource?, #wildcarded?

Constructor Details

This class inherits a constructor from Sanction::AttachedList

Instance Method Details

#null_node_classObject



15
16
17
# File 'lib/sanction/blacklist/null_list.rb', line 15

def null_node_class
  Sanction::Blacklist::NullNode
end

#permitted?Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/sanction/blacklist/null_list.rb', line 5

def permitted?
  return false if wildcard_resource?
  return false if resources.include?(@key) && ids_blank?
  return true if ids_blank?
end

#persisted?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/sanction/blacklist/null_list.rb', line 11

def persisted?
  false
end