Class: Graphiti::Audit::Row

Inherits:
Struct
  • Object
show all
Defined in:
lib/graphiti/audit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#findingsObject

Returns the value of attribute findings

Returns:

  • (Object)

    the current value of findings



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def findings
  @findings
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def options
  @options
end

#preloadedObject

Returns the value of attribute preloaded

Returns:

  • (Object)

    the current value of preloaded



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def preloaded
  @preloaded
end

#relationshipObject

Returns the value of attribute relationship

Returns:

  • (Object)

    the current value of relationship



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def relationship
  @relationship
end

#resourceObject

Returns the value of attribute resource

Returns:

  • (Object)

    the current value of resource



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def resource
  @resource
end

#resource_ids_blockerObject

Returns the value of attribute resource_ids_blocker

Returns:

  • (Object)

    the current value of resource_ids_blocker



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def resource_ids_blocker
  @resource_ids_blocker
end

#resource_ids_defaultObject

Returns the value of attribute resource_ids_default

Returns:

  • (Object)

    the current value of resource_ids_default



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def resource_ids_default
  @resource_ids_default
end

#resource_ids_sourceObject

Returns the value of attribute resource_ids_source

Returns:

  • (Object)

    the current value of resource_ids_source



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def resource_ids_source
  @resource_ids_source
end

#resource_ids_source_if_alwaysObject

Returns the value of attribute resource_ids_source_if_always

Returns:

  • (Object)

    the current value of resource_ids_source_if_always



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def resource_ids_source_if_always
  @resource_ids_source_if_always
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def target
  @target
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



10
11
12
# File 'lib/graphiti/audit.rb', line 10

def type
  @type
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/graphiti/audit.rb', line 34

def error?
  severity == :error
end

#severityObject



29
30
31
32
# File 'lib/graphiti/audit.rb', line 29

def severity
  return :error if findings.any?(&:error?)
  findings.empty? ? :ok : :warning
end

#would_start_loading?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
# File 'lib/graphiti/audit.rb', line 23

def would_start_loading?
  return false if resource_ids_default == :never

  resource_ids_source != :load && resource_ids_source_if_always == :load
end