Method: CanCan::Rule#inspect
- Defined in:
- lib/cancan/rule.rb
#inspect ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/cancan/rule.rb', line 38 def inspect repr = "#<#{self.class.name}" repr += "#{@base_behavior ? 'can' : 'cannot'} #{@actions.inspect}, #{@subjects.inspect}, #{@attributes.inspect}" if with_scope? repr += ", #{@conditions.where_values_hash}" elsif [Hash, String].include?(@conditions.class) repr += ", #{@conditions.inspect}" end repr + '>' end |